瀏覽代碼

org-keys: Do not rely on deprecated boolean value of `window-system'

* lisp/org-keys.el: Do not rely on boolean value of `window-system'.
Such usage is deprecated.  Use `display-graphic-p' instead.
Ihor Radchenko 3 年之前
父節點
當前提交
620fb24050
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org-keys.el

+ 2 - 2
lisp/org-keys.el

@@ -244,7 +244,7 @@ become effective."
 
 
 (defcustom org-use-extra-keys nil
 (defcustom org-use-extra-keys nil
   "Non-nil means use extra key sequence definitions for certain commands.
   "Non-nil means use extra key sequence definitions for certain commands.
-This happens automatically if `window-system' is nil.  This
+This happens automatically if `display-graphic-p' returns nil.  This
 variable lets you do the same manually.  You must set it before
 variable lets you do the same manually.  You must set it before
 loading Org."
 loading Org."
   :group 'org-startup
   :group 'org-startup
@@ -495,7 +495,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
 ;;  We only set them when really needed because otherwise the
 ;;  We only set them when really needed because otherwise the
 ;;  menus don't show the simple keys
 ;;  menus don't show the simple keys
 
 
-(when (or org-use-extra-keys (not window-system))
+(when (or org-use-extra-keys (not (display-graphic-p)))
   (org-defkey org-mode-map (kbd "C-c C-x c") #'org-table-copy-down)
   (org-defkey org-mode-map (kbd "C-c C-x c") #'org-table-copy-down)
   (org-defkey org-mode-map (kbd "C-c C-x m") #'org-meta-return)
   (org-defkey org-mode-map (kbd "C-c C-x m") #'org-meta-return)
   (org-defkey org-mode-map (kbd "C-c C-x M") #'org-insert-todo-heading)
   (org-defkey org-mode-map (kbd "C-c C-x M") #'org-insert-todo-heading)