标记未指向 align-regexp (Emacs) 的任何位置 [英] Marker does not point anywhere from align-regexp (Emacs)

查看:23
本文介绍了标记未指向 align-regexp (Emacs) 的任何位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调用 align-regexp 时遇到标记问题.不知何故,这不起作用并给出错误Marker 未指向任何地方".

I am having trouble with the marker in calling an align-regexp. Somehow this doesn't work and gives the error "Marker does not point anywhere".

该函数的思想是搜索一个新段落,标记它,然后对其执行 align-regexp.为什么它不起作用?

The idea of the function is that it searches for a new paragraph, marks it and then performs the align-regexp on it. Why doesn't it work?

(defun cleanR-align-smallerthan-dash ()
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (while (search-forward-regexp "[
][
]" nil t) ; confirmed to work
      (mark-paragraph)                            ; the error is probably in here
      (align-regexp (region-beginning) (region-end) "<-"))))

推荐答案

您传递的正则表达式不是 align-regexp 所期望的.

The regexp you passed is not what align-regexp is expecting.

此处查看我的回答.

这篇关于标记未指向 align-regexp (Emacs) 的任何位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆