summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-05-16 15:44:19 -0400
committerKyle Meyer <kyle@kyleam.com>2016-05-16 15:45:20 -0400
commit78a9071c13dd4c457a962ab47289ee9ac3847db2 (patch)
tree75c3eba61f4db0ba15f6cd11ee980ca14782f0f8
parentee2bd9aab5b8e9503eb4c24f90d7b0b9817bad53 (diff)
downloadsnakemake-mode-78a9071c13dd4c457a962ab47289ee9ac3847db2.tar.gz
Don't use prog-widen and prog-first-column
These functions aren't in Emacs 24.* and have been removed from the emacs-25 branch. See Emacs 124c486 (Remove prog-indentation-context, 2016-03-28).
-rw-r--r--snakemake-mode.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index c181290..8e60631 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -138,7 +138,7 @@
"Return description of rule or subworkflow block at point."
(save-excursion
(save-restriction
- (prog-widen)
+ (widen)
(let ((pos (point)))
(end-of-line)
(and (re-search-backward snakemake-rule-or-subworkflow-re nil t)
@@ -234,11 +234,10 @@ returned."
;; :after-block-start.
:after-block-start))
(let* ((initial-indent (current-indentation))
- (first-col (prog-first-column))
- (goto-first-p (or (not previous) (= initial-indent first-col))))
+ (goto-first-p (or (not previous) (= initial-indent 0))))
(save-excursion
(save-restriction
- (prog-widen)
+ (widen)
(beginning-of-line)
(if (or (looking-at-p (concat "^\\s-*" snakemake-field-key-re))
(looking-at-p (rx line-start
@@ -274,7 +273,7 @@ returned."
((save-excursion
(let ((above-indent (current-indentation))
field-indent)
- (when (> above-indent first-col)
+ (when (> above-indent 0)
(while (and (not (bobp))
(or (= above-indent
(setq field-indent (current-indentation)))