# HG changeset patch
# User Andrew Janke <andrew@apjanke.net>
# Date 1554982640 14400
#      Thu Apr 11 07:37:20 2019 -0400
# Branch fix-some-typos-in-libgui
# Node ID 35ee451bfeb7edcd0345d39510be892b7631daba
# Parent  43f6f02dd91c4bb46d7f01f8a121d9f480873aed
Fix typos and grammar errors in comments in libgui

diff --git a/libgui/src/color-picker.cc b/libgui/src/color-picker.cc
--- a/libgui/src/color-picker.cc
+++ b/libgui/src/color-picker.cc
@@ -34,17 +34,17 @@ along with Octave; see the file COPYING.
 namespace octave
 {
   // Constructor with initial color as parameter
   color_picker::color_picker (QColor old_color, QWidget *p)
     : QPushButton (p)
   {
     m_color = old_color;
     setFlat (true);
-    setFocusPolicy (Qt::NoFocus);  // no focus, would changes the color
+    setFocusPolicy (Qt::NoFocus);  // no focus, would change the color
     update_button ();
     connect (this, SIGNAL (clicked (void)), SLOT (select_color (void)));
   }
 
   // Slot for button clicked: select a new color using QColorDialog
   void color_picker::select_color (void)
   {
     QColor new_color = QColorDialog::getColor (m_color);
diff --git a/libgui/src/documentation.cc b/libgui/src/documentation.cc
--- a/libgui/src/documentation.cc
+++ b/libgui/src/documentation.cc
@@ -548,25 +548,25 @@ namespace octave
     while ( m_doc_browser->find (text) )
       {
         QTextEdit::ExtraSelection selected_item;
         selected_item.cursor = m_doc_browser->textCursor ();
         selected_item.format = format;
         selected.append (selected_item);
       }
 
-      // Apply selection and move back to the beginning
-      m_doc_browser->setExtraSelections (selected);
-      m_doc_browser->moveCursor (QTextCursor::Start);
+    // Apply selection and move back to the beginning
+    m_doc_browser->setExtraSelections (selected);
+    m_doc_browser->moveCursor (QTextCursor::Start);
   }
 
   void documentation::notice_settings (const QSettings *settings)
   {
-    // If m_help_engine is not defined, the object accessed by this method
-    // are not valid. Thus, just return in this case
+    // If m_help_engine is not defined, the objects accessed by this method
+    // are not valid. Thus, just return in this case.
     if (! m_help_engine)
       return;
 
     // Icon size in the toolbar.
     int size_idx = settings->value (global_icon_size.key,
                                     global_icon_size.def).toInt ();
     size_idx = (size_idx > 0) - (size_idx < 0) + 1;  // Make valid index from 0 to 2
 
@@ -809,33 +809,33 @@ namespace octave
     int count = qMin (new_count, int (max_history_entries));
 
     // Fill used menu entries
     for (int i = 0; i < count; i++)
       {
         QString title = m_doc_browser->historyTitle (prev_next*(i+1));
         title.remove (QRegExp ("\\s*\\(*GNU Octave \\(version [^\\)]*\\)[: \\)]*"));
 
-        // Sinve the title only contains the section name and not the
+        // Since the title only contains the section name and not the
         // specific anchor, extract the latter from the url and append
         // it to the title
         QString url = m_doc_browser->historyUrl (prev_next*(i+1)).toString ();
         if (url.contains ('#'))
           {
             // Get the anchor from the url
             QString anchor = url.split ('#').last ();
 
             // Remove internal string parts
             anchor.remove (QRegExp ("^index-"));
             anchor.remove (QRegExp ("^SEC_"));
             anchor.remove (QRegExp ("^XREF"));
             anchor.remove ("Concept-Index_cp_letter-");
             anchor.replace ("-"," ");
 
-            // replace encoded special chars by there unencoded versions
+            // replace encoded special chars by their unencoded versions
             QRegExp rx = QRegExp ("_00([0-7][0-9a-f])");
             int pos = 0;
             while ((pos = rx.indexIn(anchor, pos)) != -1)
               {
                 anchor.replace ("_00"+rx.cap (1), QChar (rx.cap (1).toInt (nullptr,16)));
                 pos += rx.matchedLength();
               }
 
diff --git a/libgui/src/dw-main-window.cc b/libgui/src/dw-main-window.cc
--- a/libgui/src/dw-main-window.cc
+++ b/libgui/src/dw-main-window.cc
@@ -227,17 +227,17 @@ namespace octave
         // created or removed.
         // In all cases, the list of dock widgets has to be updated.
         m_dw_list = findChildren<QDockWidget *>();
       }
 
     if (ev->type () == QEvent::StyleChange)
       {
         // This might indicate un- or re-docking a widget: Make sure
-        // floating widget get a copy of our actions
+        // floating widgets get a copy of our actions
         for (int i = m_dw_list.length () - 1; i >= 0; i--)
           {
             // First remove possibly existing actions
             for (int j = m_actions_list.length () - 1; j >0; j--)
               m_dw_list.at (i)->removeAction (m_actions_list.at (j));
 
             // Then add our actions for floating widgets
             if (m_dw_list.at (i)->isFloating ())
diff --git a/libgui/src/files-dock-widget.cc b/libgui/src/files-dock-widget.cc
--- a/libgui/src/files-dock-widget.cc
+++ b/libgui/src/files-dock-widget.cc
@@ -219,17 +219,17 @@ namespace octave
     m_file_tree_view->setSelectionMode (QAbstractItemView::ExtendedSelection);
     m_file_tree_view->setModel (m_file_system_model);
     m_file_tree_view->setRootIndex (rootPathIndex);
     m_file_tree_view->setSortingEnabled (true);
     m_file_tree_view->setAlternatingRowColors (true);
     m_file_tree_view->setAnimated (true);
     m_file_tree_view->setToolTip (tr ("Double-click to open file/folder, right click for alternatives"));
 
-    // get sort column and order as well as cloumn state (order and width)
+    // get sort column and order as well as column state (order and width)
 
     m_file_tree_view->sortByColumn (
           settings->value (fb_sort_column.key, fb_sort_column.def).toInt (),
           static_cast<Qt::SortOrder> (
             settings->value (fb_sort_order.key, fb_sort_order.def).toUInt ()));
 
     if (settings->contains (fb_column_state.key))
       m_file_tree_view->header ()->restoreState (
@@ -290,17 +290,17 @@ namespace octave
     connect (this, SIGNAL (run_file_signal (const QFileInfo&)),
              main_win (), SLOT (run_file_in_terminal (const QFileInfo&)));
 
     QCompleter *completer = new QCompleter (m_file_system_model, this);
     m_current_directory->setCompleter (completer);
 
     setFocusProxy (m_current_directory);
 
-    m_sync_octave_dir = true;   // default, overwirtten with notice_settings ()
+    m_sync_octave_dir = true;   // default, overwritten with notice_settings ()
     m_octave_dir = "";
   }
 
   void files_dock_widget::save_settings (void)
   {
     QSettings *settings = resource_manager::get_settings ();
 
     if (! settings)
@@ -381,18 +381,18 @@ namespace octave
         if (fileInfo.isDir ())
           {
             m_file_tree_view->setRootIndex (m_file_system_model->
                                             index (fileInfo.absoluteFilePath ()));
             m_file_system_model->setRootPath (fileInfo.absoluteFilePath ());
             if (m_sync_octave_dir && set_octave_dir)
               process_set_current_dir (fileInfo.absoluteFilePath ());
 
-            // see if its in the list, and if it is,
-            // remove it and then, put at top of the list
+            // see if it's in the list, and if it is,
+            // remove it and then put at top of the list
             int index
               = m_current_directory->findText (fileInfo.absoluteFilePath ());
             if (index != -1)
               {
                 m_current_directory->removeItem (index);
               }
             m_current_directory->insertItem (0, fileInfo.absoluteFilePath ());
             m_current_directory->setCurrentIndex (0);
@@ -695,34 +695,34 @@ namespace octave
         if (QMessageBox::question (this, tr ("Delete file/directory"),
                                    tr ("Are you sure you want to delete\n")
                                    + info.filePath (),
                                    QMessageBox::Yes | QMessageBox::No)
             == QMessageBox::Yes)
           {
             if (info.isDir ())
               {
-                // see if direcory is empty
+                // see if directory is empty
                 QDir path (info.absoluteFilePath ());
                 QList<QFileInfo> fileLst = path.entryInfoList (QDir::AllEntries |
                                                                QDir::NoDotAndDotDot);
 
                 if (fileLst.count () != 0)
                   QMessageBox::warning (this, tr ("Delete file/directory"),
                                         tr ("Can not delete a directory that is not empty"));
                 else
                   m_file_system_model->rmdir (index);
               }
             else
               {
                 // Close the file in the editor if open
                 emit file_remove_signal (info.filePath (), QString ());
                 // Remove the file.
                 bool st = m_file_system_model->remove (index);
-                // reload the old file if removing was not successful
+                // Reload the old file if removing was not successful
                 if (! st)
                   emit file_renamed_signal (false);
               }
 
             m_file_system_model->revert ();
 
           }
       }
@@ -793,17 +793,17 @@ namespace octave
           {
             process_find_files (info.absoluteFilePath ());
           }
       }
   }
 
   void files_dock_widget::notice_settings (const QSettings *settings)
   {
-    // Qsettings pointer is checked before emitting.
+    // QSettings pointer is checked before emitting.
 
     int size_idx = settings->value (global_icon_size.key,
                                     global_icon_size.def).toInt ();
     size_idx = (size_idx > 0) - (size_idx < 0) + 1;  // Make valid index from 0 to 2
 
     QStyle *st = style ();
     int icon_size = st->pixelMetric (global_icon_sizes[size_idx]);
     m_navigation_tool_bar->setIconSize (QSize (icon_size,icon_size));
diff --git a/libgui/src/gui-preferences-mw.h b/libgui/src/gui-preferences-mw.h
--- a/libgui/src/gui-preferences-mw.h
+++ b/libgui/src/gui-preferences-mw.h
@@ -30,17 +30,17 @@ const unsigned char ba_geometry_data[] =
   0x01,0xd9,0xd0,0xcb,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   0x00,0x1b,0x00,0x00,0x03,0xaf,0x00,0x00,0x02,0xb8,0x00,0x00,0x00,0x00,
   0x00,0x00,0x00,0x39,0x00,0x00,0x03,0xaf,0x00,0x00,0x02,0xb8,0x00,0x00,
   0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00
 };
 
 const gui_pref mw_geometry ("MainWindow/geometry",
   QVariant (QByteArray (reinterpret_cast<const char*> (ba_geometry_data), sizeof (ba_geometry_data))));
-  // FIXME: usew the following version when Qt4 support is dropped
+  // FIXME: use the following version when Qt4 support is dropped
   // QVariant (QByteArrayLiteral ("\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\0\0\0\0\x1b\0\0\x3\xaf\0\0\x2\xb8\0\0\0\0\0\0\0\x39\0\0\x3\xaf\0\0\x2\xb8\0\0\0\0\0\0\0\0\x5\0")));
 
 const unsigned char ba_state_data[] = {
   '\0','\0','\0',0xff,'\0','\0','\0','\0',0xfd,'\0','\0','\0',0x2,'\0','\0',
   '\0','\0','\0','\0',0x1,'&','\0','\0',0x2,'+',0xfc,0x2,'\0','\0','\0',0x3,
   0xfb,'\0','\0','\0',0x1e,'\0','F','\0','i','\0','l','\0','e','\0','s','\0',
   'D','\0','o','\0','c','\0','k','\0','W','\0','i','\0','d','\0','g','\0','e',
   '\0','t',0x1,'\0','\0','\0','?','\0','\0','\0',0xac,'\0','\0','\0',0x88,
@@ -72,13 +72,13 @@ const unsigned char ba_state_data[] = {
   '\0','\0','\0','\b',0xfc,'\0','\0','\0',0x1,'\0','\0','\0',0x2,'\0','\0',
   '\0',0x1,'\0','\0','\0',0x16,'\0','M','\0','a','\0','i','\0','n','\0','T',
   '\0','o','\0','o','\0','l','\0','b','\0','a','\0','r',0x1,'\0','\0','\0',
   '\0',0xff,0xff,0xff,0xff,'\0','\0','\0','\0','\0','\0','\0','\0'
 };
 
 const gui_pref mw_state ("MainWindow/windowState",
   QVariant (QByteArray (reinterpret_cast<const char*> (ba_state_data), sizeof (ba_state_data))));
-  // FIXME: usew the following version when Qt4 support is dropped
+  // FIXME: use the following version when Qt4 support is dropped
   // QVariant (QByteArrayLiteral ("\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x1&\0\0\x2+\xfc\x2\0\0\0\x3\xfb\0\0\0\x1e\0\x46\0i\0l\0\x65\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0?\0\0\0\xac\0\0\0\x88\0\xff\xff\xff\xfb\0\0\0\x1a\0W\0o\0r\0k\0s\0p\0\x61\0\x63\0\x65\0V\0i\0\x65\0w\x1\0\0\0\xf1\0\0\0\xca\0\0\0\x82\0\xff\xff\xff\xfb\0\0\0\"\0H\0i\0s\0t\0o\0r\0y\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\x1\xc1\0\0\0\xa9\0\0\0\x82\0\xff\xff\xff\0\0\0\x1\0\0\x2\x84\0\0\x2+\xfc\x2\0\0\0\x1\xfc\0\0\0?\0\0\x2+\0\0\0\xeb\x1\0\0\x1b\xfa\0\0\0\0\x2\0\0\0\x4\xfb\0\0\0$\0T\0\x65\0r\0m\0i\0n\0\x61\0l\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x46\0\xff\xff\xff\xfb\0\0\0.\0\x44\0o\0\x63\0u\0m\0\x65\0n\0t\0\x61\0t\0i\0o\0n\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\xcf\0\xff\xff\xff\xfb\0\0\0\x14\0\x46\0i\0l\0\x65\0\x45\0\x64\0i\0t\0o\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x62\0\xff\xff\xff\xfb\0\0\0\x1c\0V\0\x61\0r\0i\0\x61\0\x62\0l\0\x65\0\x45\0\x64\0i\0t\0o\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0;\0\xff\xff\xff\0\0\0\0\0\0\x2+\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x16\0M\0\x61\0i\0n\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0")));
 
 
 #endif
\ No newline at end of file
diff --git a/libgui/src/history-dock-widget.h b/libgui/src/history-dock-widget.h
--- a/libgui/src/history-dock-widget.h
+++ b/libgui/src/history-dock-widget.h
@@ -51,22 +51,22 @@ namespace octave
     void clear_history (void);
     void save_settings (void);
     void notice_settings (const QSettings *);
 
   signals:
 
     void information (const QString& message);
 
-    //! Signal emitted, whenever the user double-clicked a command in the
+    //! Signal emitted whenever the user double-clicks a command in the
     //! history.
 
     void command_double_clicked (const QString& command);
 
-    //! Signale emitted, whenever the user selects commands and chooses
+    //! Signal emitted whenever the user selects commands and chooses
     //! "Create script" from the popup menu.
 
     void command_create_script (const QString& commands);
 
   private slots:
 
     void update_filter_history (void);
     void filter_activate (bool enable);
diff --git a/libgui/src/m-editor/file-editor-tab.cc b/libgui/src/m-editor/file-editor-tab.cc
--- a/libgui/src/m-editor/file-editor-tab.cc
+++ b/libgui/src/m-editor/file-editor-tab.cc
@@ -298,18 +298,18 @@ namespace octave
 
   void file_editor_tab::set_current_directory (const QString& dir)
   {
     _ced = dir;
   }
 
   void file_editor_tab::handle_context_menu_edit (const QString& word_at_cursor)
   {
-    // 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
+    // search for a subfunction in actual file (this is done first because
+    // octave finds this function before others 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 ]*$");
@@ -341,17 +341,17 @@ namespace octave
         return;
       }
 
     emit edit_mfile_request (word_at_cursor, _file_name, _ced, -1);
   }
 
   // If "dbstop if ..." selected from context menu, create a conditional
   // breakpoint.  The default condition is (a) the existing condition if there
-  // is already a breakpoint (b) any selected text, or (c) empty
+  // is already a breakpoint, (b) any selected text, or (c) empty
   void file_editor_tab::handle_context_menu_break_condition (int linenr)
   {
     // Ensure editor line numbers match Octave core's line numbers.
     // Give users the option to save modifications if necessary.
     if (! unchanged_or_saved ())
       return;
 
     QString cond;
@@ -576,17 +576,17 @@ namespace octave
             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
+            // new, not 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 octave_txt_lexer ();
@@ -607,17 +607,17 @@ namespace octave
     if (! old_lexer || ! valid_file_name ()
         || QString(old_lexer->lexer ()) != QString(lexer->lexer ()))
       {
         // Delete and set new lexer
         if (old_lexer)
           delete old_lexer;
         _edit_area->setLexer (lexer);
 
-        // build information for auto completion (APIs)
+        // Build information for auto completion (APIs)
         _lexer_apis = new QsciAPIs (lexer);
 
         // Get the settings for this new lexer
         update_lexer_settings ();
       }
     else
       {
         // Otherwise, delete the newly created lexer and
@@ -666,24 +666,24 @@ namespace octave
         bool octave_functions = settings->value (
                                   "editor/codeCompletion_octave_functions", true).toBool ();
 
         QCoreApplication::setApplicationName (tmp_app_name);  // Restore name
 
         if (_is_octave_file)
           {
             // Keywords and Builtins do not change, these informations can be
-            // stored in prepared form in a file. Information on function are
+            // stored in prepared form in a file. Informations on functions are
             // changing frequently, then if functions should also be auto-
             // completed, the date of any existing file is checked.
 
             // Keywords are always used
             _prep_apis_file = prep_apis_path + lexer->lexer () + "_k";
 
-            // Buitlins are only used if the user settings say so
+            // Builtins are only used if the user settings say so
             if (octave_builtins)
               _prep_apis_file += 'b';
 
             if (octave_functions)
               _prep_apis_file += 'f';
 
             _prep_apis_file += ".pap"; // final name of apis file
 
@@ -749,17 +749,16 @@ namespace octave
                   add_octave_apis (F__builtins__ (interp));       // add new entries
 
                 if (octave_functions)
                   add_octave_apis (F__list_functions__ (interp)); // 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 (R"(\s+)")); // split
                     for (j = 0; j < keyword_list.size (); j++)         // add to API
                       _lexer_apis->add (keyword_list.at (j));
@@ -813,17 +812,17 @@ namespace octave
     _edit_area->setFoldMarginColors (bg,fg);
 
     // color indicator for highlighting all occurrences:
     // applications highlight color with more transparency
     QColor hg = QApplication::palette ().color (QPalette::Highlight);
     _edit_area->set_selection_marker_color (hg);
 
     // fix line number width with respect to the font size of the lexer and
-    // set the line numbers font depending on the lexers font
+    // set the line numbers font depending on the lexer's font
     if (settings->value ("editor/showLineNumbers", true).toBool ())
       {
         // Line numbers width
         auto_margin_width ();
 
         // Line numbers font
         QFont line_numbers_font = lexer->defaultFont ();
         int font_size = line_numbers_font.pointSize ();
@@ -1709,17 +1708,17 @@ namespace octave
         if (_cancelled)
           return QMessageBox::Cancel;
         else
           return decision;
       }
     else
       {
         // Nothing was modified.  Leave tab present in case user
-        // decides to cancel some point further along.
+        // decides to cancel at some point further along.
       }
 
     return decision;
   }
 
   void file_editor_tab::handle_file_modified_answer (int decision)
   {
     if (decision == QMessageBox::Save)
@@ -1744,17 +1743,17 @@ namespace octave
     _edit_area->setModified (modified);
   }
 
   void file_editor_tab::recover_from_exit (void)
   {
     // reset the possibly still existing read only state
     _edit_area->setReadOnly (false);
 
-    // if we are in this slot and the list of breakpoint is not empty,
+    // if we are in this slot and the list of breakpoints is not empty,
     // then this tab was saved during an exit of the applications (not
     // restoring the breakpoints and not emptying the list) and the user
     // canceled this closing late on.
     check_restore_breakpoints ();
   }
 
   void file_editor_tab::check_restore_breakpoints (void)
   {
@@ -1942,17 +1941,17 @@ namespace octave
 
     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_cr = text.count (eol_cr) - count_crlf;  // isolated cr
 
     // get default from OS or from settings
 #if defined (Q_OS_WIN32)
     int os_eol_mode = QsciScintilla::EolWindows;
 #else
     int os_eol_mode = QsciScintilla::EolUnix;
 #endif
     QSettings *settings = resource_manager::get_settings ();
@@ -2139,17 +2138,17 @@ namespace octave
 
     _encoding = _new_encoding;    // consider a possible new encoding
 
     // set the desired codec (if suitable for contents)
     QTextCodec *codec = check_valid_codec ();
     if (! codec)
       return;   // No valid codec
 
-    // Get a list of breakpoint line numbers, before  exit_debug_and_clear().
+    // Get a list of breakpoint line numbers, before exit_debug_and_clear ().
     emit report_marker_linenr (_bp_lines, _bp_conditions);
 
     // get the absolute path (if existing)
     QFileInfo file_info = QFileInfo (saveFileName);
     QString file_to_save;
     if (file_info.exists ())
       {
         file_to_save = file_info.canonicalFilePath ();
@@ -2205,17 +2204,17 @@ namespace octave
     file_to_save = file_info.canonicalFilePath ();
 
     // save filename after closing file as set_file_name starts watching again
     set_file_name (file_to_save);   // make absolute
 
     // set the window title to actual filename (not modified)
     update_window_title (false);
 
-    // files is save -> not modified, update encoding in statusbar
+    // file is save -> not modified, update encoding in statusbar
     _edit_area->setModified (false);
     _enc_indicator->setText (_encoding);
 
     if (remove_on_success)
       {
         emit tab_remove_request ();
         return;  // Don't touch member variables after removal
       }
@@ -2453,17 +2452,17 @@ namespace octave
 
   void file_editor_tab::file_has_changed (const QString&, bool do_close)
   {
     bool file_exists = QFile::exists (_file_name);
 
     if (file_exists && ! do_close)
       {
         // Test if file is really modified or if just the timezone has
-        // changed. In the latter, just return without doing anything
+        // changed. In the latter, just return without doing anything.
         QDateTime modified = QFileInfo (_file_name).lastModified ().toUTC ();
 
         if (modified <= m_last_modified)
           return;
 
         m_last_modified = modified;
       }
 
@@ -2511,17 +2510,17 @@ namespace octave
         // close the file without any user interaction
         if (do_close && ! _edit_area->isModified ())
           {
             handle_file_resave_answer (QMessageBox::Cancel);
             return;
           }
 
         // give editor and this tab the focus,
-        // possibly making the editor visible  if it is hidden
+        // possibly making the editor visible if it is hidden
         emit set_focus_editor_signal (this);
         _edit_area->setFocus ();
 
         QString modified = "";
         if (_edit_area->isModified ())
           modified = tr ("\n\nWarning: The contents in the editor is modified!");
 
         // Create a WindowModal message. The file editor tab can't be made
@@ -2774,17 +2773,17 @@ namespace octave
   {
     if (decision == QMessageBox::Yes)
       {
         // reload: file is readded to the file watcher in set_file_name ()
         load_file (_file_name);
       }
     else
       {
-        // do not reload: readd to the file watche
+        // do not reload: readd to the file watcher
         _file_system_watcher.addPath (_file_name);
       }
   }
 
   void file_editor_tab::handle_file_resave_answer (int decision)
   {
     // check decision of user in dialog
     if (decision == QMessageBox::Save)
@@ -2811,17 +2810,17 @@ namespace octave
     emit remove_all_positions ();  // debugger_position, unsure_debugger_position
 
     if (line > 0)
       {
         marker *dp;
 
         if (_edit_area->isModified ())
           {
-            // The best that can be done if the editor contents has been
+            // The best that can be done if the editor contents have been
             // modified is to see if there is a match with the original
             // line number of any existing breakpoints.  We can put a normal
             // debugger pointer at that breakpoint position.  Otherwise, it
             // isn't certain whether the original line number and current line
             // number match.
             int editor_linenr = -1;
             marker *dummy;
             emit find_translated_line_number (line, editor_linenr, dummy);
@@ -3029,19 +3028,19 @@ namespace octave
             // line breaking only in comments, check for comment style
             style_comment = _edit_area->is_style_comment ();
             if (! style_comment)
               return;       // no comment, return
           }
 
         // Here we go for breaking the current line by inserting a newline.
         // For determining the position of a specific column, we have to get
-        // the column from the QScintila function without taking tab lengths
+        // the column from the QScintilla function without taking tab lengths
         // into account, since the calculation from line/col to position ignores
-        // this, too
+        // this, too.
         _edit_area->getCursorPosition (&line, &col);
         int c = 0;
         int col_space = col;
         int indentation = _edit_area->indentation (line);
 
         // Search the first occurence of space or tab backwards starting from
         // the current column (col_space).
         while (c != ' ' && c != '\t' && col_space > indentation)
diff --git a/libgui/src/m-editor/file-editor-tab.h b/libgui/src/m-editor/file-editor-tab.h
--- a/libgui/src/m-editor/file-editor-tab.h
+++ b/libgui/src/m-editor/file-editor-tab.h
@@ -179,17 +179,17 @@ namespace octave
                                   int& editor_linenr);
     void report_marker_linenr (QIntList& lines, QStringList& conditions);
     void remove_position_via_debugger_linenr (int debugger_linenr);
     void remove_all_positions (void);
     void request_queue_cmd (octave_cmd *);
 
     // FIXME: The following is similar to "process_octave_code"
     // signal.  However, currently that signal is connected to
-    // something that simply focuses a window and not actually
+    // something that simply focuses a window and des not actually
     // communicate with Octave.
     //
     // void evaluate_octave_command (const QString& command);
 
   protected:
 
     void closeEvent (QCloseEvent *event);
     void set_file_name (const QString& fileName);
@@ -212,17 +212,17 @@ namespace octave
     void handle_find_dialog_finished (int decision);
 
     // When user closes QFileDialog box.
     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);
     void handle_save_as_filter_selected (const QString& filter);
 
-    // When user changes encoding after decoding errors where found
+    // When user changes encoding after decoding errors were found
     void handle_current_enc_changed (const QString& enc);
 
     // When apis preparation has finished and is ready to save
     void save_apis_info (void);
 
     // When the numer of lines changes -> adapt width of margin
     void auto_margin_width (void);
 
diff --git a/libgui/src/m-editor/file-editor.cc b/libgui/src/m-editor/file-editor.cc
--- a/libgui/src/m-editor/file-editor.cc
+++ b/libgui/src/m-editor/file-editor.cc
@@ -77,21 +77,21 @@ namespace octave
   }
 
 
   // File editor
 
   file_editor::file_editor (QWidget *p)
     : file_editor_interface (p)
   {
-    // Set current editing directory before construct because loaded
+    // Set current editing directory before construction because loaded
     // files will change ced accordingly.
     m_ced = QDir::currentPath ();
 
-    // set action that are later added by the main window to null,
+    // set actions that are later added by the main window to null,
     // preventing access to them when they are still undefined
     m_undo_action = nullptr;
     m_copy_action = nullptr;
     m_paste_action = nullptr;
     m_selectall_action = nullptr;
     m_closed = false;
     m_no_focus = false;
 
@@ -149,17 +149,17 @@ namespace octave
 
   void file_editor::handle_enter_debug_mode (void)
   {
     QSettings *settings = resource_manager::get_settings ();
     QString sc_run = settings->value ("shortcuts/editor_run:run_file").toString ();
     QString sc_cont = settings->value ("shortcuts/main_debug:continue").toString ();
 
     if (sc_run == sc_cont)
-      m_run_action->setShortcut (QKeySequence ());  // prevent ambigous shortcuts
+      m_run_action->setShortcut (QKeySequence ());  // prevent ambiguous shortcuts
 
     m_run_action->setToolTip (tr ("Continue"));   // update tool tip
   }
 
   void file_editor::handle_exit_debug_mode (void)
   {
     shortcut_manager::set_shortcut (m_run_action, "editor_run:run_file");
     m_run_action->setToolTip (tr ("Save File and Run"));  // update tool tip
@@ -221,17 +221,17 @@ namespace octave
     else
       real_visible = visible;
 
     if (! real_visible || m_tab_widget->count () > 0)
       return;
 
     if (startup && ! isFloating ())
       {
-        // check is editor is really visible or hidden between tabbed widgets
+        // check if 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++;
@@ -301,17 +301,17 @@ namespace octave
         if (do_encoding)
           item.encoding = session_encodings.at (n);
 
         s_data << item;
       }
 
     qSort (s_data);
 
-    // finally open the file with the desired encoding in the desired order
+    // finally open the files with the desired encoding in the desired order
     for (int n = 0; n < s_data.count (); ++n)
       request_open_file (s_data.at (n).file_name, s_data.at (n).encoding,
                          s_data.at (n).line);
   }
 
   void file_editor::focus (void)
   {
     if (m_no_focus)
@@ -353,34 +353,34 @@ namespace octave
         m_copy_action->setEnabled (true);
         m_undo_action->setEnabled (true);
       }
   }
 
   bool file_editor::check_closing (void)
   {
     // When the application or the editor is closing and the user wants to close
-    // all files in the latter case all editor tabs are checked whether
-    // they need to be saved. During these ckecked the tabs are not closed
+    // all files, in the latter case all editor tabs are checked whether
+    // they need to be saved. During these checks the tabs are not closed
     // since the user might cancel closing octave during one of these saving
     // dialogs. Therefore, saving the session for restoring at next start
-    // is not done before the application is definitely closing
+    // is not done before the application is definitely closing.
 
     // Have all file editor tabs signal what their filenames are.
     m_editor_tab_map.clear ();
     emit fetab_file_name_query (nullptr);
 
     // Save all tabs with confirmation.
     file_editor_tab::reset_cancel ();
     emit fetab_check_modified_file ();
 
     // If there was a cancellation, make the already saved/discarded tabs
-    // recovering from the exit by removing the read-only state and by
+    // recover from the exit by removing the read-only state and by
     // recovering the debugger breakpoints. Finally return false in order to
-    // cancel closing the application or the editor
+    // cancel closing the application or the editor.
     if (file_editor_tab::was_cancelled ())
       {
         emit fetab_recover_from_exit ();
         return false;
       }
 
     // Here, the application or the editor will be closed -> store the session
 
@@ -420,17 +420,17 @@ namespace octave
     settings->setValue (ed_session_enc.key, fet_encodings);
     settings->setValue (ed_session_ind.key, fet_index);
     settings->setValue (ed_session_lines.key, fet_lines);
     settings->sync ();
 
     // Finally close all the tabs and return indication that we can exit
     // the application or close the editor.
     // Closing and deleting the tabs makes the editor visible. In case it was
-    // hidden before, this state has to be restored afterwards
+    // hidden before, this state has to be restored afterwards.
     bool vis = isVisible ();
 
     for (int i = m_tab_widget->count () - 1; i >= 0; i--)
       {
         // backwards loop since m_tab_widget->count () changes during the loop
         delete m_tab_widget->widget (i);
         m_tab_widget->removeTab (i);
       }
@@ -856,17 +856,17 @@ namespace octave
   {
     // Check whether this file is already open in the editor.
     QWidget *tab = find_tab_widget (saveFileName);
 
     if (tab)
       {
         // Note: to overwrite the contents of some other file editor tab
         // with the same name requires identifying which file editor tab
-        // that is (not too difficult) then close that tab.  Of course,
+        // that is (not too difficult) then closing that tab.  Of course,
         // that could trigger another dialog box if the file editor tab
         // with the same name has modifications in it.  This could become
         // somewhat confusing to the user.  For now, opt to do nothing.
 
         // Create a NonModal message about error.
         QMessageBox *msgBox
           = new QMessageBox (QMessageBox::Critical, tr ("Octave Editor"),
                              tr ("File not saved! A file with the selected name\n%1\n"
@@ -945,17 +945,17 @@ namespace octave
     request_open_file (file, QString (), line, false, true, insert, cond);
   }
 
   void file_editor::handle_edit_file_request (const QString& file)
   {
     request_open_file (file);
   }
 
-  // Slot used for signals indicating that a file was changed/rename or
+  // Slot used for signals indicating that a file was changed/renamed or
   // is going to be deleted/renamed
   void file_editor::handle_file_remove (const QString& old_name,
                                         const QString& new_name)
   {
     // Clear old list of file data and declare a structure for file data
     m_tmp_closed_files.clear ();
     session_data f_data;
 
@@ -1033,18 +1033,18 @@ namespace octave
       }
   }
 
   // Slot for signal indicating that a file was renamed
   void file_editor::handle_file_renamed (bool load_new)
   {
     m_no_focus = true;  // Remember for not focussing editor
 
-    // Loop over all file that have to be reloaded. Start at the end of the
-    // list, otherwise the stored indexes are not correct
+    // Loop over all files that have to be reloaded. Start at the end of the
+    // list, otherwise the stored indexes are not correct.
     for (int i = m_tmp_closed_files.count () - 1; i >= 0; i--)
       {
         // Load old or new file
         if (load_new)
           {
             if (! m_tmp_closed_files.at (i).new_file_name.isEmpty ())
               request_open_file (m_tmp_closed_files.at (i).new_file_name,
                                  m_tmp_closed_files.at (i).encoding,
@@ -1120,18 +1120,18 @@ namespace octave
     set_shortcuts ();
 
     // Relay signal to file editor tabs.
     emit fetab_settings_changed (settings);
   }
 
   void file_editor::set_shortcuts (void)
   {
-    // Shortcuts also available in the main window, as well as the realted
-    // ahotcuts, are defined in main_window and added to the editor
+    // Shortcuts also available in the main window, as well as the related
+    // shortcuts, are defined in main_window and added to the editor
 
     // File menu
     shortcut_manager::set_shortcut (m_edit_function_action, "editor_file:edit_function");
     shortcut_manager::set_shortcut (m_save_action, "editor_file:save");
     shortcut_manager::set_shortcut (m_save_as_action, "editor_file:save_as");
     shortcut_manager::set_shortcut (m_close_action, "editor_file:close");
     shortcut_manager::set_shortcut (m_close_all_action, "editor_file:close_all");
     shortcut_manager::set_shortcut (m_close_others_action, "editor_file:close_other");
@@ -1209,17 +1209,17 @@ namespace octave
     shortcut_manager::set_shortcut (m_switch_right_tab_action, "editor_tabs:switch_right_tab");
     shortcut_manager::set_shortcut (m_move_tab_left_action, "editor_tabs:move_tab_left");
     shortcut_manager::set_shortcut (m_move_tab_right_action, "editor_tabs:move_tab_right");
 
   }
 
   // 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
+  // and is made visible.
   void file_editor::handle_visibility (bool visible)
   {
     if (m_closed && visible)
       {
         m_closed = false;
         QSettings *settings = resource_manager::get_settings ();
         restore_session (settings);
       }
@@ -1277,18 +1277,18 @@ namespace octave
       return;   // custom editor called
 
     QSettings *settings = resource_manager::get_settings ();
     bool show_dbg_file
       = settings->value (ed_show_dbg_file.key, ed_show_dbg_file.def).toBool ();
 
     if (openFileName.isEmpty ())
       {
-        // This happens if edit is calles without an argument
-        // Open eitor with empty edit area instead (as new file would do)
+        // This happens if edit is called without an argument
+        // Open editor with empty edit area instead (as new file would do)
         request_new_file ("");
       }
     else
       {
         // Check whether this file is already open in the editor.
         QWidget *tab = find_tab_widget (openFileName);
 
         if (tab)
@@ -1610,17 +1610,17 @@ namespace octave
 
   void file_editor::construct (void)
   {
     QWidget *editor_widget = new QWidget (this);
 
     // FIXME: what was the intended purpose of this unused variable?
     // QStyle *editor_style = QApplication::style ();
 
-    // Menu bar: do not set it native, required in MacOS and Ubuntu Unity (Qt5)
+    // Menu bar: do not set it native, required in macOS and Ubuntu Unity (Qt5)
     // for a visible menu bar in the editor widget. This property is ignored
     // on other platforms.
     m_menu_bar = new QMenuBar (editor_widget);
     m_menu_bar->setNativeMenuBar (false);
 
     m_tool_bar = new QToolBar (editor_widget);
     m_tool_bar->setMovable (true);
 
@@ -2436,17 +2436,17 @@ namespace octave
         QString rel_path_to_file = old_dir.relativeFilePath (p->first);
         QString abs_path_to_file = old_dir.absoluteFilePath (p->first);
 
         // Test whether the file is located within the directory that will
         // be removed. For this, two conditions must be met:
         // 1. The path of the file rel. to the dir is not equal to the
         //    its absolute one.
         //    If both are equal, then there is no relative path and removed
-        //    directoy and file are on different drives (e.g.on windows)
+        //    directory and file are on different drives (e.g. on windows)
         // 2. The (real) relative path does not start with "../", i.e.,
         //    the file can be reached from the directory by descending only
         if ((rel_path_to_file != abs_path_to_file)
             && (rel_path_to_file.left (3) != QString ("../")))
           {
             // The currently considered file is included in the
             // removed/renamed diectory: Delete it.
             m_no_focus = true;  // Remember for not focussing editor
diff --git a/libgui/src/m-editor/find-dialog.cc b/libgui/src/m-editor/find-dialog.cc
--- a/libgui/src/m-editor/find-dialog.cc
+++ b/libgui/src/m-editor/find-dialog.cc
@@ -288,18 +288,18 @@ namespace octave
         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
+        // 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 ())
           {
             if (do_forward)
               {
@@ -312,17 +312,17 @@ namespace octave
                 col  = _edit_area->text (line).length () - 1;
                 if (col == -1)
                   col = 0;
               }
           }
         else if (! do_forward)
           {
             // search from position before search characters text length
-            // if search backward on existing results,
+            // 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);
@@ -386,18 +386,18 @@ namespace octave
   }
 
   void find_dialog::replace (void)
   {
     if (_edit_area)
       {
         // 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
+        // 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 ();
@@ -408,17 +408,17 @@ namespace octave
   {
     int line, col;
 
     if (_edit_area)
       {
         _edit_area->getCursorPosition (&line,&col);
 
         _rep_all = 1;
-        find_next ();  // find first occurence (forward)
+        find_next ();  // find first occurrence (forward)
         while (_find_result_available)   // while search string is found
           {
             do_replace ();
             _rep_all++;                                          // inc counter
             find_next ();                                        // find next
           }
 
         QMessageBox msg_box (QMessageBox::Information, tr ("Replace Result"),
diff --git a/libgui/src/m-editor/octave-qscintilla.cc b/libgui/src/m-editor/octave-qscintilla.cc
--- a/libgui/src/m-editor/octave-qscintilla.cc
+++ b/libgui/src/m-editor/octave-qscintilla.cc
@@ -594,17 +594,17 @@ namespace octave
             unindent (line);
             setCursorPosition (line+1,
                                indentation (line));
           }
         return;
       }
   }
 
-  // Do smart indendation of current selection or line.
+  // Do smart indentation of current selection or line.
   void octave_qscintilla::smart_indent_line_or_selected_text (int lineFrom,
                                                               int lineTo)
   {
     QRegExp blank_line_regexp = QRegExp ("^[\t ]*$");
 
     QRegExp begin_block_regexp
       = QRegExp ("^([\t ]*)(if|elseif|else"
                  "|for|while|do|parfor"
@@ -946,17 +946,17 @@ namespace octave
               show_replace_action_tooltip ();
           }
       }
   }
 
   void octave_qscintilla::auto_close (int auto_endif, int linenr,
                                       const QString& line, QString& first_word)
   {
-    // Insert and "end" for an "if" etc., if needed.
+    // Insert an "end" for an "if" etc., if needed.
     // (Use of "while" allows "return" to skip the rest.
     // It may be clearer to use "if" and "goto",
     // but that violates the coding standards.)
 
     bool autofill_simple_end = (auto_endif == 2);
 
     size_t start = line.toStdString ().find_first_not_of (" \t");
 
diff --git a/libgui/src/main-window.cc b/libgui/src/main-window.cc
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -260,17 +260,17 @@ namespace octave
     // octave.
 
     construct ();
 
     read_settings ();
 
     init_terminal_size ();
 
-    // Connect signals for changes in visibility not before window is
+    // Connect signals for changes in visibility now before window is
     // shown.
 
     connect_visibility_changed ();
 
     focus_command_window ();
   }
 
   main_window::~main_window (void)
@@ -308,41 +308,41 @@ namespace octave
   {
     m_command_window->focus ();
   }
 
   // catch focus changes and determine the active dock widget
   void main_window::focus_changed (QWidget *, QWidget *new_widget)
   {
     // If there is no new widget (e.g., when pressing <alt> and the global
-    // menu gets active, we can return immediately
+    // menu gets active), we can return immediately
     if (! new_widget)
       return;
 
     octave_dock_widget *dock = nullptr;
     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
 
     QList<octave_dock_widget *> w_list = dock_widget_list ();
 
     while (w_new && w_new != m_main_tool_bar && count < 100)
       {
         // Go through all dock widgets and check whether the current widget
-        // widget with focus is a child of one of it
+        // with focus is a child of one of them
         foreach (octave_dock_widget *w, w_list)
           {
             if (w->isAncestorOf (w_new))
               dock = w;
           }
 
         if (dock)
           break;
 
-        // If not yet found (in case w_new is not a childs of its dock widget),
+        // If not yet found (in case w_new is not a child of its dock widget),
         // test next widget in the focus chain
         w_new = qobject_cast<QWidget *> (w_new->previousInFocusChain ());
 
         // Measures preventing an endless loop
         if (w_new == start)
           break;  // We have arrived where we began ==> exit loop
         count++;  // Limited number of trials
       }
@@ -769,17 +769,17 @@ namespace octave
       }
 
     QString icon;
     foreach (octave_dock_widget *widget, dock_widget_list ())
       {
         QString name = widget->objectName ();
         if (! name.isEmpty ())
           {
-            // if children has a name
+            // if child has a name
             icon = widget_icon_data[icon_set_found].path; // prefix | octave-logo
             if (widget_icon_data[icon_set_found].name != "NONE")
               icon += name + ".png"; // add widget name and ext.
             widget->setWindowIcon (QIcon (icon));
           }
       }
     if (widget_icon_data[icon_set_found].name != "NONE")
       m_release_notes_icon = widget_icon_data[icon_set_found].path
@@ -947,17 +947,17 @@ namespace octave
 
   // Slot that is called if return is pressed in the line edit of the
   // combobox to change to a new directory or a directory that is already
   // in the drop down list.
 
   void main_window::accept_directory_line_edit (void)
   {
     // Get new directory name, and change to it if it is new.  Otherwise,
-    // the combo box will triggers the "activated" signal to change to the
+    // the combo box will trigger the "activated" signal to change to the
     // directory.
 
     QString dir = m_current_directory_combo_box->currentText ();
 
     int index = m_current_directory_combo_box->findText (dir);
 
     if (index < 0)
       set_current_working_directory (dir);
@@ -1117,17 +1117,17 @@ namespace octave
     QSettings *settings = resource_manager::get_settings ();
     if (! p || settings->value ("useCustomFileEditor",false).toBool ())
       p = this;
     QString new_name = QInputDialog::getText (p, tr ("New Function"),
                                               tr ("New function name:\n"), QLineEdit::Normal, "", &ok);
 
     if (ok && new_name.length () > 0)
       {
-        // append suffix if it not already exists
+        // append suffix if it does not already exist
         if (new_name.rightRef (2) != ".m")
           new_name.append (".m");
         // check whether new files are created without prompt
         if (! settings->value ("editor/create_new_file",false).toBool ())
           {
             // no, so enable this settings and wait for end of new file loading
             settings->setValue ("editor/create_new_file",true);
             connect (m_editor_window, SIGNAL (file_loaded_signal (void)),
@@ -1141,17 +1141,17 @@ namespace octave
   void main_window::handle_edit_mfile_request (const QString& fname,
                                                const QString& ffile,
                                                const QString& curr_dir,
                                                int line)
   {
     interpreter& interp
       = __get_interpreter__ ("main_window::clear_workspace_callback");
 
-    // Split possible subfuntions
+    // Split possible subfunctions
     QStringList fcn_list = fname.split ('>');
     QString fcn_name = fcn_list.at (0) + ".m";
 
     // Is it a regular function within the search path? (Call Fexist)
     octave_value_list fct = Fexist (interp, ovl (fname.toStdString ()),0);
     int type = fct (0).int_value ();
 
     QString message = QString ();
@@ -1287,17 +1287,17 @@ namespace octave
   void main_window::init_terminal_size (void)
   {
     emit init_terminal_size_signal ();
   }
 
   void main_window::set_window_layout (QSettings *settings)
   {
     // Restore main window state and geometry from settings file or, in case
-    // of an error from the default layout
+    // of an error, from the default layout
     if (settings)
       {
         if (! restoreState (
                 settings->value (mw_state.key, mw_state.def).toByteArray ()))
           restoreState (mw_state.def.toByteArray ());
 
         if (! restoreGeometry (
                 settings->value (mw_geometry.key, mw_geometry.def).toByteArray ()))
@@ -1371,17 +1371,17 @@ namespace octave
     if (! settings)
       {
         qDebug ("Error: QSettings pointer from resource manager is NULL.");
         return;
       }
 
     settings->setValue ("MainWindow/geometry", saveGeometry ());
     settings->setValue ("MainWindow/windowState", saveState ());
-    // write the list of recent used directories
+    // write the list of recently used directories
     QStringList curr_dirs;
     for (int i=0; i<m_current_directory_combo_box->count (); i++)
       {
         curr_dirs.append (m_current_directory_combo_box->itemText (i));
       }
     settings->setValue ("MainWindow/current_directory_list", curr_dirs);
     settings->sync ();
   }
@@ -1536,17 +1536,17 @@ namespace octave
     m_find_files_dlg->activateWindow ();
 
   }
 
   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
+    // return if the user doesn't want to use readline shortcuts
     if (! m_prevent_readline_conflicts)
       return;
 
     if (set_shortcuts)
       {
         // terminal loses focus: set the global shortcuts
         configure_shortcuts ();
       }
@@ -1637,17 +1637,17 @@ namespace octave
   }
 
   void main_window::set_file_encoding (const QString& new_encoding)
   {
     m_file_encoding = new_encoding;
   }
 
   // The following slot is called after files have been selected in the
-  // open file dialog., possibly with a new selected encoding stored in
+  // open file dialog, possibly with a new selected encoding stored in
   // m_file_encoding
   void main_window::request_open_files (const QStringList& open_file_names)
   {
     for (int i = 0; i < open_file_names.count (); i++)
       emit open_file_signal (open_file_names.at (i), m_file_encoding, -1);
   }
 
   void main_window::edit_variable (const QString &expr, const octave_value& val)
@@ -1864,22 +1864,22 @@ namespace octave
     connect (m_file_browser_window,
              SIGNAL (file_remove_signal (const QString&, const QString&)),
              m_editor_window,
              SLOT (handle_file_remove (const QString&, const QString&)));
 
     connect (m_file_browser_window, SIGNAL (file_renamed_signal (bool)),
              m_editor_window, SLOT (handle_file_renamed (bool)));
 
-    // Signals for removing/renaming files/dirs in the temrinal window
+    // Signals for removing/renaming files/dirs in the terminal window
     connect (m_octave_qt_link, SIGNAL (file_renamed_signal (bool)),
              m_editor_window, SLOT (handle_file_renamed (bool)));
 #endif
 
-    // Signals for removing/renaming files/dirs in the temrinal window
+    // Signals for removing/renaming files/dirs in the terminal window
     connect (m_octave_qt_link,
              SIGNAL (file_remove_signal (const QString&, const QString&)),
              this, SLOT (file_remove_proxy (const QString&, const QString&)));
 
     octave_link::post_event (this,
                              &main_window::resize_command_window_callback);
 
     configure_shortcuts ();
@@ -2183,17 +2183,17 @@ namespace octave
     connect (m_clear_workspace_action, SIGNAL (triggered (void)),
              this, SLOT (handle_clear_workspace_request (void)));
 
     connect (m_clipboard, SIGNAL (dataChanged (void)),
              this, SLOT (clipboard_has_changed (void)));
     clipboard_has_changed ();
 #if defined (Q_OS_WIN32)
     // Always enable paste action (unreliable clipboard signals in windows)
-    // FIXME: This has to be removed, when the clipboards signals in windows
+    // FIXME: This has to be removed, when the clipboard signals in windows
     //        are working again
     m_paste_action->setEnabled (true);
     m_clear_clipboard_action->setEnabled (true);
 #endif
 
     connect (m_preferences_action, SIGNAL (triggered (void)),
              this, SLOT (process_settings_dialog_request (void)));
   }
@@ -2243,17 +2243,17 @@ namespace octave
 
     m_debug_quit = construct_debug_menu_item (
                                               "db-stop", tr ("Quit Debug Mode"),
                                               SLOT (debug_quit (void)));
   }
 
   void main_window::editor_tabs_changed (bool have_tabs)
   {
-    // Set state of action which depend on the existance of editor tabs
+    // Set state of actions which depend on the existence of editor tabs
     m_editor_has_tabs = have_tabs;
     m_debug_step_over->setEnabled (have_tabs);
   }
 
   QAction * main_window::construct_window_menu_item (QMenu *p,
                                                      const QString& item,
                                                      bool checkable,
                                                      QWidget *widget)
@@ -2263,17 +2263,17 @@ namespace octave
     addAction (action);  // important for shortcut context
     action->setCheckable (checkable);
     action->setShortcutContext (Qt::ApplicationShortcut);
 
     if (widget)  // might be zero for m_editor_window
       {
         if (checkable)
           {
-            // action for visibilty of dock widget
+            // action for visibility of dock widget
             connect (action, SIGNAL (toggled (bool)),
                      widget, SLOT (setVisible (bool)));
 
             connect (widget, SIGNAL (active_changed (bool)),
                      action, SLOT (setChecked (bool)));
           }
         else
           {
@@ -2802,17 +2802,17 @@ namespace octave
          "</html>\n");
 
     emit display_news_signal (html_text);
 
     emit finished ();
   }
 
   //! Reimplements QApplication::notify.
-  /*! Octave's own exceptions are caugh and rethrown in the interpreter
+  /*! Octave's own exceptions are caught and rethrown in the interpreter
       thread.*/
   bool
   octave_qapplication::notify (QObject *receiver, QEvent *ev)
   {
     try
       {
         return QApplication::notify (receiver, ev);
       }
diff --git a/libgui/src/octave-cmd.h b/libgui/src/octave-cmd.h
--- a/libgui/src/octave-cmd.h
+++ b/libgui/src/octave-cmd.h
@@ -84,43 +84,43 @@ namespace octave
 
   public:
 
     enum cmd_upd {
       CMD_UPD_NO        = 0,
       CMD_UPD_WORKSPACE = 1
     };
 
-    //! Command using built in functions requiring interpreter, no return values
-    /*! Command calling a built in function, which uses an interpreter and does
+    //! Command using builtin functions requiring interpreter, no return values
+    /*! Command calling a builtin function, which uses an interpreter and does
      *  not have any return values
      * @param Ff Pointer to the builtin function
      * @param argin Input parameters for Ff as octave value list (default empty)
-     * @param update A memeber of cmd_upd for possibly required updates after
+     * @param update A member of cmd_upd for possibly required updates after
      *               the executing Ff
      */
     octave_cmd_builtin (
           octave_value_list (*Ff) (octave::interpreter&, const octave_value_list&, int),
           octave_value_list argin = ovl (), cmd_upd update = CMD_UPD_NO)
       : octave_cmd (), m_callback_fi (Ff), m_callback_f (nullptr),
         m_argin (argin), m_nargout (0), m_argout_receiver (nullptr),
         m_argout_handler (nullptr), m_update (update)
     {  }
 
-    //! Command using built in functions not requiring interpreter, no return values
+    //! Command using builtin functions not requiring interpreter, no return values
     octave_cmd_builtin (
           octave_value_list (*Ff) (const octave_value_list&, int),
           octave_value_list argin = ovl (), cmd_upd update = CMD_UPD_NO)
       : octave_cmd (), m_callback_fi (nullptr), m_callback_f (Ff),
         m_argin (argin), m_nargout (0), m_argout_receiver (nullptr),
         m_argout_handler (nullptr), m_update (update)
     {  }
 
-    //! Command using built in functions requiring interpreter, with return values
-    /*! Command calling a built in function, which uses an interpreter and
+    //! Command using builtin functions requiring interpreter, with return values
+    /*! Command calling a builtin function, which uses an interpreter and
      *  has return values
      * @param Ff Pointer to the builtin function
      * @param argin Input parameters for Ff as octave value list
      * @param argout Number of output values
      * @param argout_receiver Receiver of the the signal containing the return values
      * @param argout_handler  Slot for the signal containing the return values
      * @param update A member of cmd_upd for possibly required updates after
      *               the executing Ff
@@ -134,17 +134,17 @@ namespace octave
           const char *argout_handler = nullptr, cmd_upd update = CMD_UPD_NO)
       : octave_cmd (), m_callback_fi (Ff), m_callback_f (nullptr),
         m_argin (argin), m_nargout (nargout), m_argout_receiver (argout_receiver),
         m_argout_handler (argout_handler), m_update (update)
     {
       init_cmd_retval ();
     }
 
-    //! Command using built in functions not requiring interpreter, with return values
+    //! Command using builtin functions not requiring interpreter, with return values
     octave_cmd_builtin (
           octave_value_list (*Ff) (const octave_value_list&, int),
           octave_value_list argin, int nargout, QObject *argout_receiver,
           const char *argout_handler = nullptr, cmd_upd update = CMD_UPD_NO)
       : octave_cmd (), m_callback_fi (nullptr), m_callback_f (Ff),
         m_argin (argin), m_nargout (nargout), m_argout_receiver (argout_receiver),
         m_argout_handler (argout_handler), m_update (update)
     {
@@ -172,17 +172,17 @@ namespace octave
 
     cmd_upd m_update;
 
   private:
 
     //! Internal method connecting the signal for the return values
     /*! Internal method for connecting the signal for later sending the return
      * values to the caller. The connection has to be queued ensuring that
-     * the receiver's slot is actually executed in the GUI thread
+     * the receiver's slot is actually executed in the GUI thread.
      */
     void init_cmd_retval (void);
   };
 
   class octave_cmd_debug : public octave_cmd_exec
   {
   public:
 
diff --git a/libgui/src/octave-dock-widget.cc b/libgui/src/octave-dock-widget.cc
--- a/libgui/src/octave-dock-widget.cc
+++ b/libgui/src/octave-dock-widget.cc
@@ -164,18 +164,18 @@ namespace octave
                     "\n"
                     "QDockWidget::float-button\n"
                     "{\n"
                     "  right: %9px;\n"
                     "  top: 3px;\n"
                     "}\n"
                     ).arg (close_icon).arg (float_icon).arg (icon_size)
                      .arg (close_tooltip).arg (float_tooltip)
-                     .arg (titlebar_foreground). arg (titlebar_background)
-                     .arg ((icon_size*2)/3). arg((icon_size*7)/3);
+                     .arg (titlebar_foreground).arg (titlebar_background)
+                     .arg ((icon_size*2)/3).arg ((icon_size*7)/3);
   }
 
   octave_dock_widget::octave_dock_widget (const QString& obj_name, QWidget *p)
     : label_dock_widget (p), m_recent_float_geom (), m_recent_dock_geom (),
       m_waiting_for_mouse_button_release (false)
   {
     setObjectName (obj_name);
 
diff --git a/libgui/src/octave-dock-widget.h b/libgui/src/octave-dock-widget.h
--- a/libgui/src/octave-dock-widget.h
+++ b/libgui/src/octave-dock-widget.h
@@ -87,17 +87,17 @@ namespace octave
 
     virtual void connect_visibility_changed (void);
 
     void set_predecessor_widget (octave_dock_widget *prev_widget);
 
   signals:
 
     //! Custom signal that tells whether a user has clicked away that dock
-    //! widget, i.e the active dock widget has changed.
+    //! widget, i.e. the active dock widget has changed.
 
     void active_changed (bool active);
 
     void queue_make_window (bool widget_was_dragged);
 
     void queue_make_widget (void);
 
     void request_queue_cmd (octave_cmd *);
diff --git a/libgui/src/resource-manager.cc b/libgui/src/resource-manager.cc
--- a/libgui/src/resource-manager.cc
+++ b/libgui/src/resource-manager.cc
@@ -84,34 +84,34 @@ namespace octave
         = QString::fromLocal8Bit (qgetenv ("XDG_CONFIG_HOME"));
 
     if ((! sfile.exists ()) && xdg_config_home.isEmpty ())
       {
         // File does not exist yet: Look for a settings file at the old
         // location ($HOME/.config/octave/qt-settings) for impoting all
         // available keys into the new settings file.
         // Do not look for an old settings file if XDG_CONFIG_HOME is set,
-        // since then a non-existin new settings file does not necessarily
+        // since then a nonexistent new settings file does not necessarily
         // indicate a first run of octave with new config file locations.
 #if defined (HAVE_QSTANDARDPATHS)
         QString home_path
             = QStandardPaths::writableLocation (QStandardPaths::HomeLocation);
 #else
         QString home_path
             = QDesktopServices::storageLocation (QDesktopServices::HomeLocation);
 #endif
 
         QString old_settings_directory = home_path + "/.config/octave";
         QString old_settings_file = old_settings_directory + "/qt-settings";
 
         QFile ofile (old_settings_file);
 
         if (ofile.exists ())
           {
-            // Old settings file exists, create a QSettings object related
+            // Old settings file exists; create a QSettings object related
             // to it and copy all available keys to the new settings
             QSettings old_settings (old_settings_file, QSettings::IniFormat);
 
             QStringList keys = old_settings.allKeys ();
             for (int i = 0; i < keys.count(); i++)
               m_default_settings->setValue (keys.at(i),
                                             old_settings.value(keys.at(i)));
 
@@ -396,17 +396,17 @@ namespace octave
   }
 
   QIcon resource_manager::do_icon (const QString& icon_name, bool fallback)
   {
     // If system icon theme is not desired, take own icon files
     if (! m_settings->value (global_icon_theme.key, global_icon_theme.def).toBool ())
       return QIcon (":/actions/icons/" + icon_name + ".png");
 
-    // Use system icon theme with own files as fallback except the fallback is
+    // Use system icon theme with own files as fallback except when the fallback is
     // explicitly disabled (fallback=false)
     if (fallback)
       return QIcon::fromTheme (icon_name,
                                QIcon (":/actions/icons/" + icon_name + ".png"));
     else
       return QIcon::fromTheme (icon_name);
   }
 
diff --git a/libgui/src/shortcut-manager.cc b/libgui/src/shortcut-manager.cc
--- a/libgui/src/shortcut-manager.cc
+++ b/libgui/src/shortcut-manager.cc
@@ -200,17 +200,17 @@ namespace octave
     // append the new shortcut to the list
     shortcut_t shortcut_info;
     shortcut_info.m_description = description;
     shortcut_info.m_settings_key = key;
     shortcut_info.m_actual_sc = actual;
     shortcut_info.m_default_sc = def_sc;
     m_sc << shortcut_info;
 
-    // insert shortcut in order check for duplicates later
+    // insert shortcut in order to check for duplicates later
     if (! actual.isEmpty ())
       m_shortcut_hash[actual.toString ()] = m_sc.count ();
     m_action_hash[key] = m_sc.count ();
 
     // check whether ctrl+d is used from main window, i.e. is a global shortcut
     if (key.startsWith ("main_")
         && actual == QKeySequence (Qt::ControlModifier+Qt::Key_D))
       m_settings->setValue ("shortcuts/main_ctrld",true);
@@ -218,18 +218,18 @@ namespace octave
 
   void shortcut_manager::do_init_data (void)
   {
     Qt::KeyboardModifier 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).
+    // Some of octave's default shortcuts on windows/linux are already defined
+    // as system wide shortcuts on macOS (almost all Function keys).
     // Prefix those with Option (Alt) modifier to avoid conflicts.
     prefix = Qt::AltModifier;
 #else
     ctrl = Qt::ControlModifier;
     prefix = Qt::NoModifier;
 #endif
 
     Qt::KeyboardModifiers ctrl_shift = ctrl | Qt::ShiftModifier;
@@ -320,17 +320,17 @@ namespace octave
     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 ());
 
     // Tab handling
     // The following shortcuts are moved into a separate tab. The key names
-    // are not change for preserving compatibility with older versions
+    // are not changed, for preserving compatibility with older versions
     init (tr ("Close Tab"), "editor_file:close", QKeySequence::Close);
     init (tr ("Close All Tabs"), "editor_file:close_all", QKeySequence ());
     init (tr ("Close Other Tabs"), "editor_file:close_other", QKeySequence ());
     init (tr ("Switch to Left Tab"), "editor_tabs:switch_left_tab",
           QKeySequence (ctrl + Qt::Key_PageUp));
     init (tr ("Switch to Right Tab"), "editor_tabs:switch_right_tab",
           QKeySequence (ctrl + Qt::Key_PageDown));
     init (tr ("Move Tab Left"), "editor_tabs:move_tab_left",
diff --git a/libgui/src/tab-bar.cc b/libgui/src/tab-bar.cc
--- a/libgui/src/tab-bar.cc
+++ b/libgui/src/tab-bar.cc
@@ -16,17 +16,17 @@ GNU General Public License for more deta
 
 You should have received a copy of the GNU General Public License
 along with Octave; see the file COPYING.  If not, see
 <https://www.gnu.org/licenses/>.
 
 */
 
 // This file implements a tab bar derived from QTabBar with a contextmenu
-// and possibility to close a tab via double-left and middle mouse click.
+// and possibility to close a tab via double-left or middle mouse click.
 
 #if defined (HAVE_CONFIG_H)
 #  include "config.h"
 #endif
 
 #include "tab-bar.h"
 
 namespace octave
@@ -137,17 +137,17 @@ namespace octave
               {
                 // No action selected, back to previous tab
                 setCurrentIndex (current_idx);
               }
             else
               {
                 // Was the possibly only closed tab before or after the
                 // previously current tab? According to the result, use previous
-                // index or reduce it by one. Also prevent using a too large
+                // index or reduce it by one. Also prevent using a too large index
                 // if other or all files were closed.
                 int new_idx = count () - 1;
                 if (new_idx > 0)
                   {
                     if (current_idx - clicked_idx > 0)
                       new_idx = current_idx - 1;
                     else if (current_idx - clicked_idx < 0)
                       new_idx = current_idx;
diff --git a/libgui/src/tab-bar.h b/libgui/src/tab-bar.h
--- a/libgui/src/tab-bar.h
+++ b/libgui/src/tab-bar.h
@@ -16,17 +16,17 @@ GNU General Public License for more deta
 
 You should have received a copy of the GNU General Public License
 along with Octave; see the file COPYING.  If not, see
 <https://www.gnu.org/licenses/>.
 
 */
 
 // This file implements a tab bar derived from QTabBar with a contextmenu
-// and possibility to close a tab via double-left and middle mouse click.
+// and possibility to close a tab via double-left or middle mouse click.
 
 #if ! defined (octave_tab_bar_h)
 #define octave_tab_bar_h 1
 
 #include <QMenu>
 #include <QTabBar>
 #include <QMouseEvent>
 
diff --git a/libgui/src/variable-editor.cc b/libgui/src/variable-editor.cc
--- a/libgui/src/variable-editor.cc
+++ b/libgui/src/variable-editor.cc
@@ -1254,17 +1254,17 @@ namespace octave
              stack, SLOT (set_editable (bool)));
 
     edit_view->setModel (model);
     connect (edit_view, SIGNAL (doubleClicked (const QModelIndex&)),
              model, SLOT (double_click (const QModelIndex&)));
 
     // Must supply a title for a QLabel to be created.  Calling set_title()
     // more than once will add more QLabels.  Could change octave_dock_widget
-    // to always supply a QLabl (initially empty) and then simply update its
+    // to always supply a QLabel (initially empty) and then simply update its
     // contents.
     page->set_title (name);
     if (page->titleBarWidget () != nullptr)
       {
         QLabel *existing_ql = page->titleBarWidget ()->findChild<QLabel *> ();
         connect (model, SIGNAL (update_label_signal (const QString&)),
                  existing_ql, SLOT (setText (const QString&)));
         existing_ql->setMargin (2);
@@ -1661,17 +1661,17 @@ namespace octave
 
     m_tool_bar->addSeparator ();
 
     action = add_tool_bar_button (resource_manager::icon ("go-up"),
                                   tr ("Up"), this, SLOT (levelUp ()));
     action->setStatusTip(tr("Go one level up in variable hierarchy"));
 
     // The QToolButton mouse-clicks change active window, so connect all
-    // HoverToolButton and RuternFocusToolButton objects to the mechanism
+    // HoverToolButton and ReturnFocusToolButton objects to the mechanism
     // that restores active window and focus before acting.
     QList<HoverToolButton *> hbuttonlist
       = m_tool_bar->findChildren<HoverToolButton *> (""
 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS)
                                                      , Qt::FindDirectChildrenOnly
 #endif
                                                      );
     for (int i = 0; i < hbuttonlist.size (); i++)
diff --git a/libgui/src/variable-editor.h b/libgui/src/variable-editor.h
--- a/libgui/src/variable-editor.h
+++ b/libgui/src/variable-editor.h
@@ -211,17 +211,17 @@ namespace octave
 
   private:
 
     void add_edit_actions (QMenu *menu, const QString& qualifier_string);
 
     variable_editor_model *m_var_model;
   };
 
-  // Gadgets to keep track and restore what variable window
+  // Gadgets to keep track of and restore what variable window
   // was in focus just prior to selecting something on the
   // menu bar
 
   class HoverToolButton : public QToolButton
   {
     Q_OBJECT
 
   public:
diff --git a/libgui/src/workspace-model.cc b/libgui/src/workspace-model.cc
--- a/libgui/src/workspace-model.cc
+++ b/libgui/src/workspace-model.cc
@@ -43,17 +43,17 @@ namespace octave
     : QAbstractTableModel (p)
   {
     m_columnNames.append (tr ("Name"));
     m_columnNames.append (tr ("Class"));
     m_columnNames.append (tr ("Dimension"));
     m_columnNames.append (tr ("Value"));
     m_columnNames.append (tr ("Attribute"));
 
-    // Initialize the bachground and foreground colors of special
+    // Initialize the background and foreground colors of special
     // classes in the workspace view. The structure is
     // m_storage_class_colors(1,2,...,colors):        background colors
     // m_storage_class_colors(colors+1,...,2*colors): foreground colors
     int colors = resource_manager::storage_class_chars ().length ();
     for (int i = 0; i < 2*colors; i++)
       m_storage_class_colors.append (QColor (Qt::white));
 
   }
@@ -136,17 +136,17 @@ namespace octave
         if ((role == Qt::BackgroundColorRole || role == Qt::ForegroundRole)
             && m_enable_colors)
           {
             QString class_chars = resource_manager::storage_class_chars ();
             int actual_class
               = class_chars.indexOf (m_scopes[idx.row ()].toLatin1 ());
             if (actual_class >= 0)
               {
-                // Valid class: Get backgorund (normal indexes) or foreground
+                // Valid class: Get background (normal indexes) or foreground
                 // color (indexes with offset)
                 if (role == Qt::ForegroundRole)
                   actual_class += class_chars.length ();
 
                 return QVariant (m_storage_class_colors.at (actual_class));
               }
             else
               return retval;
diff --git a/libgui/src/workspace-view.cc b/libgui/src/workspace-view.cc
--- a/libgui/src/workspace-view.cc
+++ b/libgui/src/workspace-view.cc
@@ -169,17 +169,17 @@ namespace octave
 
   void workspace_view::setModel (workspace_model *model)
   {
     m_filter_model.setSourceModel (model);
     m_filter_model.setFilterKeyColumn(0);
 
     m_view->setModel (&m_filter_model);
 
-    // set the sorting after a model was set, it would be ignored otherwise
+    // set the sorting after the model is set, it would be ignored otherwise
     QSettings *settings = resource_manager::get_settings ();
     m_view->sortByColumn (settings->value ("workspaceview/sort_by_column",0).toInt (),
                           static_cast<Qt::SortOrder> (settings->value ("workspaceview/sort_order", Qt::AscendingOrder).toUInt ()));
 
     m_model = model;
   }
 
   void
@@ -335,17 +335,17 @@ namespace octave
 
   void
   workspace_view::contextmenu_requested (const QPoint& qpos)
   {
     QMenu menu (this);
 
     QModelIndex index = m_view->indexAt (qpos);
 
-    // if it isnt Local, Glocal etc, allow the ctx menu
+    // if it isn't Local, Global etc, allow the ctx menu
     if (index.isValid () && index.column () == 0)
       {
         QString var_name = get_var_name (index);
 
         menu.addAction (tr ("Open in Variable Editor"), this,
                         SLOT (handle_contextmenu_edit ()));
 
         menu.addAction (tr ("Copy name"), this,
@@ -413,17 +413,17 @@ namespace octave
   workspace_view::handle_contextmenu_copy_value (void)
   {
     QModelIndex index = m_view->currentIndex ();
 
     if (index.isValid ())
       {
         QString var_name = get_var_name (index);
 
-        // FIXME: this looks suspciously unsafe.
+        // FIXME: this looks suspiciously unsafe.
         interpreter& interp
           = __get_interpreter__ ("workspace_view::handle_contextmenu_copy_value");
 
         octave_value val = interp.varval (var_name.toStdString ());
         if (val.is_undefined ())
           val = 0;
         std::ostringstream buf;
         val.print_raw (buf, true);
