Fix docstring warnings.

This commit is contained in:
Vincent Zhang 2021-10-01 01:09:41 +08:00
parent ffedb34800
commit af99ef6625
2 changed files with 13 additions and 9 deletions

View file

@ -1086,7 +1086,8 @@ See https://github.com/seagle0128/doom-modeline/issues/301."
(defun doom-modeline-icon (icon-set icon-name unicode text &rest args)
"Display icon of ICON-NAME with ARGS in mode-line.
ICON-SET includes `octicon', `faicon', `material', `alltheicons' and `fileicon', etc.
ICON-SET includes `octicon', `faicon', `material', `alltheicons' and `fileicon',
etc.
UNICODE is the unicode char fallback. TEXT is the ASCII char fallback.
ARGS is same as `all-the-icons-octicon' and others."
(let ((face (or (plist-get args :face) 'mode-line)))
@ -1223,7 +1224,8 @@ directory too."
(advice-add #'shrink-path--dirs-internal :override #'doom-modeline-shrink-path--dirs-internal)
(defun doom-modeline-buffer-file-name ()
"Propertized variable `buffer-file-name' based on `doom-modeline-buffer-file-name-style'."
"Propertized variable `buffer-file-name' based on
`doom-modeline-buffer-file-name-style'."
(let* ((buffer-file-name (file-local-name (or (buffer-file-name (buffer-base-buffer)) "")))
(buffer-file-truename (file-local-name
(or buffer-file-truename (file-truename buffer-file-name) "")))
@ -1283,7 +1285,8 @@ If TRUNCATE-TAIL is t also truncate the parent directory of the file."
'face 'doom-modeline-buffer-file))))))
(defun doom-modeline--buffer-file-name-relative (_file-path true-file-path &optional include-project)
"Propertized variable `buffer-file-name' showing directories relative to project's root only."
"Propertized variable `buffer-file-name' showing directories relative to
project's root only."
(let ((root (file-local-name (doom-modeline-project-root))))
(if (null root)
(propertize "%b" 'face 'doom-modeline-buffer-file)

View file

@ -429,8 +429,9 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
'local-map mode-line-buffer-identification-keymap)))
(doom-modeline-def-segment buffer-default-directory
"Displays `default-directory' with the icon and state . This is for special buffers
like the scratch buffer where knowing the current project directory is important."
"Displays `default-directory' with the icon and state . This is for special
buffers like the scratch buffer where knowing the current project directory is
important."
(let ((face (cond ((buffer-modified-p)
'doom-modeline-buffer-modified)
((doom-modeline--active) 'doom-modeline-buffer-path)
@ -1331,10 +1332,10 @@ mouse-1: Display Line and Column Mode Menu"
(doom-modeline-def-segment matches
"Displays: 1. the currently recording macro, 2. A current/total for the
current search term (with `anzu'), 3. The number of substitutions being conducted
with `evil-ex-substitute', and/or 4. The number of active `iedit' regions,
5. The current/total for the highlight term (with `symbol-overlay'), 6. The number
of active `multiple-cursors'."
current search term (with `anzu'), 3. The number of substitutions being
conducted with `evil-ex-substitute', and/or 4. The number of active `iedit'
regions, 5. The current/total for the highlight term (with `symbol-overlay'),
6. The number of active `multiple-cursors'."
(let ((meta (concat (doom-modeline--macro-recording)
(doom-modeline--anzu)
(doom-modeline--phi-search)