From b443c3c7480f3fff9bb574e79a72e69e3ad501bb Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 26 Jun 2016 23:29:51 -0400 Subject: Fix comment in files-in-below-directory * doc/lispintro/emacs-lisp-intro.texi (Files List): Comment should not say append, since the code is adding to front of list (Bug #21589). --- doc/lispintro/emacs-lisp-intro.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 10162b3546..86c8da0e46 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -15465,7 +15465,7 @@ Here is the function: @group (cond ;; check to see whether filename ends in '.el' - ;; and if so, append its name to a list. + ;; and if so, add its name to a list. ((equal ".el" (substring (car (car current-directory-list)) -3)) (setq el-files-list (cons (car (car current-directory-list)) el-files-list))) -- cgit v1.2.3 From 272391f1d63eae0c1002d62fa5e5b1d63a0da767 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 17 Jul 2016 00:21:42 -0400 Subject: profiler: document prefix arg for tree expansion * doc/lispref/debugging.texi (Profiling): * lisp/profiler.el (profiler-report-toggle-entry): Document use of prefix argument to expand whole call trees. --- doc/lispref/debugging.texi | 5 +++-- lisp/profiler.el | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 98c47052cb..2f83b4040f 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -840,8 +840,9 @@ called, followed by how much resource (processor or memory) it used in absolute and percentage times since profiling started. If a given line has a @samp{+} symbol at the left-hand side, you can expand that line by typing @key{RET}, in order to see the function(s) called by -the higher-level function. Pressing @key{RET} again will collapse -back to the original state. +the higher-level function. Use a prefix argument (@key{C-u RET}) to +see the whole call tree below a function. Pressing @key{RET} again +will collapse back to the original state. Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function. Press @kbd{d} to view a function's documentation. diff --git a/lisp/profiler.el b/lisp/profiler.el index 401cae537e..3bee3c561a 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -692,7 +692,8 @@ With a prefix argument, expand the whole subtree." (defun profiler-report-toggle-entry (&optional arg) "Expand entry at point if the tree is collapsed, -otherwise collapse." +otherwise collapse. With prefix argument, expand all subentries +below entry at point." (interactive "P") (or (profiler-report-expand-entry arg) (profiler-report-collapse-entry))) -- cgit v1.2.3 From 3c97b0f7589e06aeb1ab0147f0ee32974c32926d Mon Sep 17 00:00:00 2001 From: Vincent Belaïche Date: Fri, 29 Jul 2016 13:44:14 +0200 Subject: Fix ses-delete-blanks to delete only blanks + documentation. * doc/misc/ses.texi (Quick Tutorial): Mention the '!' 'ses-range' modifier as an alternative to 'ses+'. (Advanced Features): Add a refernce to node 'Nonrelocatable references' concerning function 'ses-rename-cell'. (Standard formula functions): Mention the '!' 'ses-range' modifier as an alternative to 'ses-delete-blanks'. (More on cell printing): Fix fallback printer definition. Minor editorial formatting changes. (Nonrelocatable references): Document the use of 'ses-rename-cell' as a better way to make cell reference non-relocatable. (The data area): Document the presence of local printer definitions in the data area. * lisp/ses.el (ses-delete-blanks): Do not remove *error*. Any error in an argument should propagate into the using formula rather than being silently hidden ! --- doc/misc/ses.texi | 54 ++++++++++++++++++++++++++++++++++++++++++------------ lisp/ses.el | 3 ++- 2 files changed, 44 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 58f9ba8ccf..e443dfb6cb 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -187,6 +187,14 @@ the end-points, e.g.: (The @code{apply} is necessary because @code{ses-range} produces a @emph{list} of values. This allows for more complex possibilities.) +Alternatively you can use the @code{!} modifier of @code{ses-range} to +remove blank cells which allows to use @code{+} instead of +@code{ses+}: + +@lisp +(apply '+ (ses-range A2 A5 !)) +@end lisp + @c =================================================================== @node The Basics @@ -595,8 +603,8 @@ Pops up a menu to set the current row as the header, or revert to column letters. @item M-x ses-rename-cell @findex ses-rename-cell -Rename a cell from a standard A1-like name to any -string. +Rename a cell from a standard A1-like name to any string that can be a +valid local variable name (See also @ref{Nonrelocatable references}). @item M-x ses-repair-cell-reference-all @findex ses-repair-cell-reference-all When you interrupt a cell formula update by clicking @kbd{C-g}, then @@ -791,8 +799,17 @@ are some useful functions to call from your formulas: @table @code @item (ses-delete-blanks &rest @var{args}) -Returns a list from which all blank cells (value is either @code{nil} or -'*skip*) have been deleted. +Returns a list from which all blank cells (value is either @code{nil} +or '*skip*) have been deleted. Order of args is reverted. Please note +that @code{ses-range} has a @code{!} modifier that allows to remove +blanks, so it is possible to write: +@lisp +(ses-range A1 A5 !) +@end lisp +instead of +@lisp +(apply 'ses-delete-blanks (ses-range A1 A5 <)) +@end lisp @item (ses+ &rest @var{args}) Sum of non-blank arguments. @@ -842,9 +859,9 @@ this to undo the effect of @kbd{t}. @end table When a printer function signals an error, the fallback printer -@samp{"%s"} is substituted. This is useful when your column printer +@samp{"%S"} is substituted. This is useful when your column printer is numeric-only and you use a string as a cell value. Note that the -standard default printer is ``%.7g'' which is numeric-only, so cells +standard default printer is @samp{"%.7g"} which is numeric-only, so cells that are empty of contain strings will use the fallback printer. @kbd{c} on such cells will display ``Format specifier doesn't match argument type''. @@ -986,7 +1003,18 @@ can type ahead without worrying about the glitch. @kbd{C-u C-y} relocates none of the cell-references. What about mixed cases? -You can use +The best way is to rename cells that you do not want to be relocatable +by using @code{ses-rename-cell}. +@findex ses-rename-cell +Cells that do not have an A1-like name style are not relocated on +yank. Using this method, the concerned cells won't be relocated +whatever formula they appear in. Please note however that when a +formula contains some range @code{(ses-range @var{cell1} @var{cell2})} +then in the yanked formula each range bound @var{cell1} and +@var{cell2} are relocated, or not, indepently, depending on whether +they are A1-like or renamed. + +An alternative method is to use @lisp (symbol-value 'B3) @end lisp @@ -994,7 +1022,8 @@ to make an @dfn{absolute reference}. The formula relocator skips over quoted things, so this will not be relocated when pasted or when rows/columns are inserted/deleted. However, B3 will not be recorded as a dependency of this cell, so this cell will not be updated -automatically when B3 is changed. +automatically when B3 is changed, this is why using +@code{ses-rename-cell} is most of the time preferable. The variables @code{row} and @code{col} are dynamically bound while a cell formula is being evaluated. You can use @@ -1011,12 +1040,13 @@ kind of dependency is also not recorded. @findex ses-reconstruct-all Begins with an 014 character, followed by sets of cell-definition -macros for each row, followed by column-widths, column-printers, +macros for each row, followed by the set of local printer +defintitions, followed by column-widths, column-printers, default-printer, and header-row. Then there's the global parameters -(file-format ID, numrows, numcols) and the local variables (specifying -@acronym{SES} mode for the buffer, etc.). +(file-format ID, row count, column count, local printer count) and the +local variables (specifying @acronym{SES} mode for the buffer, etc.). -When a @acronym{SES} file is loaded, first the numrows and numcols values are +When a @acronym{SES} file is loaded, first the global parameters are loaded, then the entire data area is @code{eval}ed, and finally the local variables are processed. diff --git a/lisp/ses.el b/lisp/ses.el index 0b38af41a8..b379ef1f9c 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,3 +1,4 @@ + ;;; ses.el -- Simple Emacs Spreadsheet -*- lexical-binding:t -*- ;; Copyright (C) 2002-2016 Free Software Foundation, Inc. @@ -3746,7 +3747,7 @@ Use `math-format-value' as a printer for Calc objects." "Return ARGS reversed, with the blank elements (nil and *skip*) removed." (let (result) (dolist (cur args) - (unless (memq cur '(nil *skip* *error*)) + (unless (memq cur '(nil *skip*)) (push cur result))) result)) -- cgit v1.2.3 From b275cc76f0c5ab49e81445fcc3420c8772aefd42 Mon Sep 17 00:00:00 2001 From: Vincent Belaïche Date: Fri, 29 Jul 2016 13:47:57 +0200 Subject: Fix English. * doc/misc/ses.texi (Nonrelocatable references): Fix grammatically incorrect English. --- doc/misc/ses.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index e443dfb6cb..327cd7af05 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -1010,9 +1010,9 @@ Cells that do not have an A1-like name style are not relocated on yank. Using this method, the concerned cells won't be relocated whatever formula they appear in. Please note however that when a formula contains some range @code{(ses-range @var{cell1} @var{cell2})} -then in the yanked formula each range bound @var{cell1} and -@var{cell2} are relocated, or not, indepently, depending on whether -they are A1-like or renamed. +then in the yanked formula each bound @var{cell1} and @var{cell2} is +relocated, or not, indepently, depending on whether it is A1-like or +renamed. An alternative method is to use @lisp -- cgit v1.2.3 From f7ceb8e028923287a75b148a49c65d3232f68ace Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 2 Aug 2016 11:43:05 -0700 Subject: Revert "Fix English." This reverts commit b275cc76f0c5ab49e81445fcc3420c8772aefd42. --- doc/misc/ses.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 327cd7af05..e443dfb6cb 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -1010,9 +1010,9 @@ Cells that do not have an A1-like name style are not relocated on yank. Using this method, the concerned cells won't be relocated whatever formula they appear in. Please note however that when a formula contains some range @code{(ses-range @var{cell1} @var{cell2})} -then in the yanked formula each bound @var{cell1} and @var{cell2} is -relocated, or not, indepently, depending on whether it is A1-like or -renamed. +then in the yanked formula each range bound @var{cell1} and +@var{cell2} are relocated, or not, indepently, depending on whether +they are A1-like or renamed. An alternative method is to use @lisp -- cgit v1.2.3 From cd1b4d60ceeb74852954824fd9ba0f6c21ca9c94 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 2 Aug 2016 11:43:07 -0700 Subject: Revert "Fix ses-delete-blanks to delete only blanks + documentation." This reverts commit 3c97b0f7589e06aeb1ab0147f0ee32974c32926d. --- doc/misc/ses.texi | 54 ++++++++++++------------------------------------------ lisp/ses.el | 3 +-- 2 files changed, 13 insertions(+), 44 deletions(-) (limited to 'doc') diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index e443dfb6cb..58f9ba8ccf 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -187,14 +187,6 @@ the end-points, e.g.: (The @code{apply} is necessary because @code{ses-range} produces a @emph{list} of values. This allows for more complex possibilities.) -Alternatively you can use the @code{!} modifier of @code{ses-range} to -remove blank cells which allows to use @code{+} instead of -@code{ses+}: - -@lisp -(apply '+ (ses-range A2 A5 !)) -@end lisp - @c =================================================================== @node The Basics @@ -603,8 +595,8 @@ Pops up a menu to set the current row as the header, or revert to column letters. @item M-x ses-rename-cell @findex ses-rename-cell -Rename a cell from a standard A1-like name to any string that can be a -valid local variable name (See also @ref{Nonrelocatable references}). +Rename a cell from a standard A1-like name to any +string. @item M-x ses-repair-cell-reference-all @findex ses-repair-cell-reference-all When you interrupt a cell formula update by clicking @kbd{C-g}, then @@ -799,17 +791,8 @@ are some useful functions to call from your formulas: @table @code @item (ses-delete-blanks &rest @var{args}) -Returns a list from which all blank cells (value is either @code{nil} -or '*skip*) have been deleted. Order of args is reverted. Please note -that @code{ses-range} has a @code{!} modifier that allows to remove -blanks, so it is possible to write: -@lisp -(ses-range A1 A5 !) -@end lisp -instead of -@lisp -(apply 'ses-delete-blanks (ses-range A1 A5 <)) -@end lisp +Returns a list from which all blank cells (value is either @code{nil} or +'*skip*) have been deleted. @item (ses+ &rest @var{args}) Sum of non-blank arguments. @@ -859,9 +842,9 @@ this to undo the effect of @kbd{t}. @end table When a printer function signals an error, the fallback printer -@samp{"%S"} is substituted. This is useful when your column printer +@samp{"%s"} is substituted. This is useful when your column printer is numeric-only and you use a string as a cell value. Note that the -standard default printer is @samp{"%.7g"} which is numeric-only, so cells +standard default printer is ``%.7g'' which is numeric-only, so cells that are empty of contain strings will use the fallback printer. @kbd{c} on such cells will display ``Format specifier doesn't match argument type''. @@ -1003,18 +986,7 @@ can type ahead without worrying about the glitch. @kbd{C-u C-y} relocates none of the cell-references. What about mixed cases? -The best way is to rename cells that you do not want to be relocatable -by using @code{ses-rename-cell}. -@findex ses-rename-cell -Cells that do not have an A1-like name style are not relocated on -yank. Using this method, the concerned cells won't be relocated -whatever formula they appear in. Please note however that when a -formula contains some range @code{(ses-range @var{cell1} @var{cell2})} -then in the yanked formula each range bound @var{cell1} and -@var{cell2} are relocated, or not, indepently, depending on whether -they are A1-like or renamed. - -An alternative method is to use +You can use @lisp (symbol-value 'B3) @end lisp @@ -1022,8 +994,7 @@ to make an @dfn{absolute reference}. The formula relocator skips over quoted things, so this will not be relocated when pasted or when rows/columns are inserted/deleted. However, B3 will not be recorded as a dependency of this cell, so this cell will not be updated -automatically when B3 is changed, this is why using -@code{ses-rename-cell} is most of the time preferable. +automatically when B3 is changed. The variables @code{row} and @code{col} are dynamically bound while a cell formula is being evaluated. You can use @@ -1040,13 +1011,12 @@ kind of dependency is also not recorded. @findex ses-reconstruct-all Begins with an 014 character, followed by sets of cell-definition -macros for each row, followed by the set of local printer -defintitions, followed by column-widths, column-printers, +macros for each row, followed by column-widths, column-printers, default-printer, and header-row. Then there's the global parameters -(file-format ID, row count, column count, local printer count) and the -local variables (specifying @acronym{SES} mode for the buffer, etc.). +(file-format ID, numrows, numcols) and the local variables (specifying +@acronym{SES} mode for the buffer, etc.). -When a @acronym{SES} file is loaded, first the global parameters are +When a @acronym{SES} file is loaded, first the numrows and numcols values are loaded, then the entire data area is @code{eval}ed, and finally the local variables are processed. diff --git a/lisp/ses.el b/lisp/ses.el index b379ef1f9c..0b38af41a8 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,4 +1,3 @@ - ;;; ses.el -- Simple Emacs Spreadsheet -*- lexical-binding:t -*- ;; Copyright (C) 2002-2016 Free Software Foundation, Inc. @@ -3747,7 +3746,7 @@ Use `math-format-value' as a printer for Calc objects." "Return ARGS reversed, with the blank elements (nil and *skip*) removed." (let (result) (dolist (cur args) - (unless (memq cur '(nil *skip*)) + (unless (memq cur '(nil *skip* *error*)) (push cur result))) result)) -- cgit v1.2.3