aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2013-05-24 15:37:55 -0400
committerStefan Monnier2013-05-24 15:37:55 -0400
commit650cff3d874e68a8aa80cbdb71ff9f48e10d1cb6 (patch)
treeccd37f50a1ca75b81b3c602937d8be1a71caa0b2 /test
parent9631677d730a314f55378f5da6734db521f8130d (diff)
downloademacs-650cff3d874e68a8aa80cbdb71ff9f48e10d1cb6.tar.gz
emacs-650cff3d874e68a8aa80cbdb71ff9f48e10d1cb6.zip
* lisp/emacs-lisp/smie.el (smie-auto-fill): Rework to be more robust.
(smie-setup): Use add-function to set it. * lisp/progmodes/octave.el (octave-smie-rules): Return nil rather than 0 after a semi-colon; it works better for smie-auto-fill. (octave--indent-new-comment-line): New function. (octave-indent-new-comment-line): Use it (indirectly). (octave-mode): Don't disable smie-auto-fill. Use add-function to modify comment-line-break-function.
Diffstat (limited to 'test')
-rw-r--r--test/indent/octave.m30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/indent/octave.m b/test/indent/octave.m
index bc7784f1ba2..98be02acd74 100644
--- a/test/indent/octave.m
+++ b/test/indent/octave.m
@@ -1089,13 +1089,13 @@ function [pkg_idx_struct] = parse_pkg_idx (packdir)
1089 1089
1090 while (! feof (fid) || line != -1) 1090 while (! feof (fid) || line != -1)
1091 if (! any (! isspace (line)) || line(1) == "#" || any (line == "=")) 1091 if (! any (! isspace (line)) || line(1) == "#" || any (line == "="))
1092 ## Comments, blank lines or comments about unimplemented 1092 ## Comments, blank lines or comments about unimplemented
1093 ## functions: do nothing 1093 ## functions: do nothing
1094 ## FIXME: probably comments and pointers to external functions 1094 ## FIXME: probably comments and pointers to external functions
1095 ## could be treated better when printing to screen? 1095 ## could be treated better when printing to screen?
1096 elseif (! isempty (strfind (line, ">>"))) 1096 elseif (! isempty (strfind (line, ">>")))
1097 ## Skip package name and description as they are in DESCRIPTION 1097 ## Skip package name and description as they are in DESCRIPTION
1098 ## already. 1098 ## already.
1099 elseif (! isspace (line(1))) 1099 elseif (! isspace (line(1)))
1100 ## Category. 1100 ## Category.
1101 if (! isempty (pkg_idx_struct{cat_num}.functions)) 1101 if (! isempty (pkg_idx_struct{cat_num}.functions))
@@ -1658,7 +1658,7 @@ function desc = get_description (filename)
1658 line = fgetl (fid); 1658 line = fgetl (fid);
1659 while (line != -1) 1659 while (line != -1)
1660 if (line(1) == "#") 1660 if (line(1) == "#")
1661 ## Comments, do nothing. 1661 ## Comments, do nothing.
1662 elseif (isspace(line(1))) 1662 elseif (isspace(line(1)))
1663 ## Continuation lines 1663 ## Continuation lines
1664 if (exist ("keyword", "var") && isfield (desc, keyword)) 1664 if (exist ("keyword", "var") && isfield (desc, keyword))
@@ -1752,9 +1752,9 @@ function deps_cell = fix_depends (depends)
1752 endif 1752 endif
1753 version = fix_version (parts{2}); 1753 version = fix_version (parts{2});
1754 1754
1755 ## If no version is specified for the dependency 1755 ## If no version is specified for the dependency
1756 ## we say that the version should be greater than 1756 ## we say that the version should be greater than
1757 ## or equal to "0.0.0". 1757 ## or equal to "0.0.0".
1758 else 1758 else
1759 package = tolower (strip (dep)); 1759 package = tolower (strip (dep));
1760 operator = ">="; 1760 operator = ">=";
@@ -1859,7 +1859,7 @@ function bad_deps = get_unsatisfied_deps (desc, installed_pkgs_lst)
1859 if (! compare_versions (OCTAVE_VERSION, dep.version, dep.operator)) 1859 if (! compare_versions (OCTAVE_VERSION, dep.version, dep.operator))
1860 bad_deps{end+1} = dep; 1860 bad_deps{end+1} = dep;
1861 endif 1861 endif
1862 ## Is the current dependency not Octave? 1862 ## Is the current dependency not Octave?
1863 else 1863 else
1864 ok = false; 1864 ok = false;
1865 for i = 1:length (installed_pkgs_lst) 1865 for i = 1:length (installed_pkgs_lst)
@@ -2025,7 +2025,7 @@ function load_packages (files, handle_deps, local_list, global_list)
2025 ## Load all. 2025 ## Load all.
2026 if (length (files) == 1 && strcmp (files{1}, "all")) 2026 if (length (files) == 1 && strcmp (files{1}, "all"))
2027 idx = [1:length(installed_pkgs_lst)]; 2027 idx = [1:length(installed_pkgs_lst)];
2028 ## Load auto. 2028 ## Load auto.
2029 elseif (length (files) == 1 && strcmp (files{1}, "auto")) 2029 elseif (length (files) == 1 && strcmp (files{1}, "auto"))
2030 idx = []; 2030 idx = [];
2031 for i = 1:length (installed_pkgs_lst) 2031 for i = 1:length (installed_pkgs_lst)
@@ -2033,7 +2033,7 @@ function load_packages (files, handle_deps, local_list, global_list)
2033 idx (end + 1) = i; 2033 idx (end + 1) = i;
2034 endif 2034 endif
2035 endfor 2035 endfor
2036 ## Load package_name1 ... 2036 ## Load package_name1 ...
2037 else 2037 else
2038 idx = []; 2038 idx = [];
2039 for i = 1:length (files) 2039 for i = 1:length (files)
@@ -2100,8 +2100,8 @@ function unload_packages (files, handle_deps, local_list, global_list)
2100 idx = strcmp (p, d); 2100 idx = strcmp (p, d);
2101 if (any (idx)) 2101 if (any (idx))
2102 rmpath (d); 2102 rmpath (d);
2103 ## FIXME: We should also check if we need to remove items from 2103 ## FIXME: We should also check if we need to remove items from
2104 ## EXEC_PATH. 2104 ## EXEC_PATH.
2105 endif 2105 endif
2106 endfor 2106 endfor
2107endfunction 2107endfunction