contrib/gaphrase.el
changeset 1157 41bb8575966d
parent 1152 ebaadea64df1
child 1161 e410e63f74e8
equal deleted inserted replaced
1156:5eafc99ca629 1157:41bb8575966d
    33     (let (beg end num)
    33     (let (beg end num)
    34       (catch 'return
    34       (catch 'return
    35         (when (looking-at "## \\([1-9][0-9]*\\)")
    35         (when (looking-at "## \\([1-9][0-9]*\\)")
    36           (setq beg (match-beginning 1)
    36           (setq beg (match-beginning 1)
    37                 end (match-end 1))
    37                 end (match-end 1))
    38           (setq num (string-to-int (buffer-substring beg end)))
    38           (setq num (string-to-number (buffer-substring beg end)))
    39           (delete-region beg end)
    39           (delete-region beg end)
    40           (goto-char beg)
    40           (goto-char beg)
    41           (setq num (1+ num))
    41           (setq num (1+ num))
    42           (insert (int-to-string num))
    42           (insert (int-to-string num))
    43           (throw 'return num))
    43           (throw 'return num))