aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2020-11-28 12:05:43 +0100
committerOmar Polo <op@omarpolo.com>2020-11-28 12:05:43 +0100
commit7de51bee1e5fe03de8a5e4c566d6f104414c4bf6 (patch)
tree23e26a3b7811e1c60fe4569abc66396b61417d3a
parent9a27cb3346de13f0ed3f37692c8ccca6caef7cf3 (diff)
downloadsam.el-7de51bee1e5fe03de8a5e4c566d6f104414c4bf6.tar.gz
sam.el-7de51bee1e5fe03de8a5e4c566d6f104414c4bf6.tar.bz2
docs & hardening of sam-set-dot
-rw-r--r--sam.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/sam.el b/sam.el
index 83d7656..7230a49 100644
--- a/sam.el
+++ b/sam.el
@@ -109,10 +109,13 @@
(setq mark-active t))))
(defun sam-set-dot (address)
- (when sam-current-buffer
- (if (string-equal address "")
- nil
- (sam-dot-select-line (string-to-number address)))))
+ "Set the dot to ADDRESS."
+ (cond ((not sam-current-buffer)
+ (sam-report-error "No buffer selected"))
+ ((string-equal address "")
+ nil)
+ (t
+ (sam-dot-select-line (string-to-number address)))))
(defun sam-get-line ()
"Return the string on the current line."