emacs24 backtab未定义,如何定义此快捷键

Jer*_*ang 10 emacs emacs24

如何<backtab>在emacs24中定义短键?

我找到了一些解决方案,

喜欢:

但它对我不起作用.


到底:

(global-set-key (kbd "<backtab>") 'un-indent-by-removing-4-spaces)
(defun un-indent-by-removing-4-spaces ()
  "remove 4 spaces from beginning of of line"
  (interactive)
  (save-excursion
    (save-match-data
      (beginning-of-line)
      ;; get rid of tabs at beginning of line
      (when (looking-at "^\\s-+")
        (untabify (match-beginning 0) (match-end 0)))
      (when (looking-at "^    ")
        (replace-match "")))))
Run Code Online (Sandbox Code Playgroud)

工作对我!

谢谢@Drew和@lawlist.