소스 검색

org-src.el: Fix checkdoc warnings

* org-src.el: Fix checkdoc warnings.
Nicholas Vollmer 4 년 전
부모
커밋
aa6f8ed877
1개의 변경된 파일14개의 추가작업 그리고 8개의 파일을 삭제
  1. 14 8
      lisp/org-src.el

+ 14 - 8
lisp/org-src.el

@@ -37,6 +37,7 @@
 (require 'org-compat)
 (require 'org-compat)
 (require 'org-keys)
 (require 'org-keys)
 
 
+(declare-function org--get-expected-indentation "org" (element contentsp))
 (declare-function org-mode "org" ())
 (declare-function org-mode "org" ())
 (declare-function org--get-expected-indentation "org" (element contentsp))
 (declare-function org--get-expected-indentation "org" (element contentsp))
 (declare-function org-element-at-point "org-element" ())
 (declare-function org-element-at-point "org-element" ())
@@ -240,8 +241,7 @@ green, respectability.
   :package-version '(Org . "9.0"))
   :package-version '(Org . "9.0"))
 
 
 (defcustom org-src-tab-acts-natively t
 (defcustom org-src-tab-acts-natively t
-  "If non-nil, the effect of TAB in a code block is as if it were
-issued in the language major mode buffer."
+  "If non-nil, TAB uses the language's major-mode binding in code blocks."
   :type 'boolean
   :type 'boolean
   :package-version '(Org . "9.4")
   :package-version '(Org . "9.4")
   :group 'org-babel)
   :group 'org-babel)
@@ -304,7 +304,8 @@ is 0.")
 (put 'org-src--preserve-blank-line 'permanent-local t)
 (put 'org-src--preserve-blank-line 'permanent-local t)
 
 
 (defun org-src--construct-edit-buffer-name (org-buffer-name lang)
 (defun org-src--construct-edit-buffer-name (org-buffer-name lang)
-  "Construct the buffer name for a source editing buffer."
+  "Construct the buffer name for a source editing buffer.
+Format is \"*Org Src ORG-BUFFER-NAME [ LANG ]*\"."
   (concat "*Org Src " org-buffer-name "[ " lang " ]*"))
   (concat "*Org Src " org-buffer-name "[ " lang " ]*"))
 
 
 (defun org-src--edit-buffer (beg end)
 (defun org-src--edit-buffer (beg end)
@@ -614,7 +615,7 @@ Leave point in edit buffer."
 ;;; Fontification of source blocks
 ;;; Fontification of source blocks
 
 
 (defun org-src-font-lock-fontify-block (lang start end)
 (defun org-src-font-lock-fontify-block (lang start end)
-  "Fontify code block.
+  "Fontify code block between START and END using LANG's syntax.
 This function is called by Emacs' automatic fontification, as long
 This function is called by Emacs' automatic fontification, as long
 as `org-src-fontify-natively' is non-nil."
 as `org-src-fontify-natively' is non-nil."
   (let ((lang-mode (org-src-get-lang-mode lang)))
   (let ((lang-mode (org-src-get-lang-mode lang)))
@@ -760,7 +761,9 @@ See also `org-src-mode-hook'."
 ;;; Babel related functions
 ;;; Babel related functions
 
 
 (defun org-src-associate-babel-session (info)
 (defun org-src-associate-babel-session (info)
-  "Associate edit buffer with comint session."
+  "Associate edit buffer with comint session.
+INFO should be a list simlar in format to the return value of
+`org-babel-get-src-block-info'."
   (interactive)
   (interactive)
   (let ((session (cdr (assq :session (nth 2 info)))))
   (let ((session (cdr (assq :session (nth 2 info)))))
     (and session (not (string= session "none"))
     (and session (not (string= session "none"))
@@ -770,6 +773,7 @@ See also `org-src-mode-hook'."
            (and (fboundp f) (funcall f session))))))
            (and (fboundp f) (funcall f session))))))
 
 
 (defun org-src-babel-configure-edit-buffer ()
 (defun org-src-babel-configure-edit-buffer ()
+  "Configure src editing buffer."
   (when org-src--babel-info
   (when org-src--babel-info
     (org-src-associate-babel-session org-src--babel-info)))
     (org-src-associate-babel-session org-src--babel-info)))
 
 
@@ -842,6 +846,7 @@ Raise an error when current buffer is not a source editing buffer."
   org-src--source-type)
   org-src--source-type)
 
 
 (defun org-src-switch-to-buffer (buffer context)
 (defun org-src-switch-to-buffer (buffer context)
+  "Switch to BUFFER considering CONTEXT and `org-src-window-setup'."
   (pcase org-src-window-setup
   (pcase org-src-window-setup
     (`plain
     (`plain
      (when (eq context 'exit) (quit-restore-window))
      (when (eq context 'exit) (quit-restore-window))
@@ -1204,11 +1209,12 @@ the area in the Org mode buffer."
   (interactive)
   (interactive)
   (let (org-src--allow-write-back) (org-edit-src-exit)))
   (let (org-src--allow-write-back) (org-edit-src-exit)))
 
 
-(defun org-edit-src-continue (e)
+(defun org-edit-src-continue (event)
   "Unconditionally return to buffer editing area under point.
   "Unconditionally return to buffer editing area under point.
-Throw an error if there is no such buffer."
+Throw an error if there is no such buffer.
+EVENT is passed to `mouse-set-point'."
   (interactive "e")
   (interactive "e")
-  (mouse-set-point e)
+  (mouse-set-point event)
   (let ((buf (get-char-property (point) 'edit-buffer)))
   (let ((buf (get-char-property (point) 'edit-buffer)))
     (if buf (org-src-switch-to-buffer buf 'continue)
     (if buf (org-src-switch-to-buffer buf 'continue)
       (user-error "No sub-editing buffer for area at point"))))
       (user-error "No sub-editing buffer for area at point"))))