aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJuanma Barranquero2019-10-17 02:45:06 +0200
committerJuanma Barranquero2019-10-17 02:45:06 +0200
commit3ad407005bf6560f4db40cab9dbeeabe554fb457 (patch)
tree220cc14a498e7586c8c330ac4766ab7c10b3d26b /lisp/progmodes
parent2bb0703e24ec1b02bb2ab4be67719e2e050cc4d3 (diff)
downloademacs-3ad407005bf6560f4db40cab9dbeeabe554fb457.tar.gz
emacs-3ad407005bf6560f4db40cab9dbeeabe554fb457.zip
lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nil
* lisp/progmodes/flymake-proc.el (flymake-proc--find-buffer-for-file): Doc fix; return value is a buffer, not t. * lisp/progmodes/ebrowse.el (ebrowse-member-display-p): Doc fix; return value is the MEMBER argument, not nil. * lisp/files.el (hack-one-local-variable-eval-safep): * lisp/play/doctor.el (doctor-nounp, doctor-pronounp): * lisp/progmodes/flymake-proc.el (flymake-proc--check-include): * lisp/progmodes/js.el (js--broken-arrow-terminates-line-p): Doc fix; a non-nil return value is not always t. * lisp/image.el (image-type-available-p): * lisp/simple.el (region-active-p): * lisp/window.el (frame-root-window-p): * src/buffer.c (Fbuffer_live_p): * src/image.c (Finit_image_library): * src/window.c (Fwindow_minibuffer_p): Doc fix; a non-nil return value is always t. * doc/lispref/minibuf.texi (Minibuffer Windows): Doc fix.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ebrowse.el3
-rw-r--r--lisp/progmodes/flymake-proc.el4
-rw-r--r--lisp/progmodes/js.el2
3 files changed, 5 insertions, 4 deletions
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 733e3735821..eb0ec87a222 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -2641,7 +2641,8 @@ means the member buffer is standalone. CLASS is its class."
2641 2641
2642 2642
2643(defun ebrowse-member-display-p (member) 2643(defun ebrowse-member-display-p (member)
2644 "Return t if MEMBER must be displayed under the current filter settings." 2644 "Check if MEMBER must be displayed under the current filter settings.
2645If so, return MEMBER; otherwise return nil."
2645 (if (and (aref ebrowse--filters (ebrowse-ms-visibility member)) 2646 (if (and (aref ebrowse--filters (ebrowse-ms-visibility member))
2646 (or (null ebrowse--const-display-flag) 2647 (or (null ebrowse--const-display-flag)
2647 (ebrowse-const-p member)) 2648 (ebrowse-const-p member))
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index f08ba2f3681..571ee170e32 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -444,7 +444,7 @@ instead of reading master file from disk."
444 444
445(defun flymake-proc--check-include (source-file-name inc-name include-dirs) 445(defun flymake-proc--check-include (source-file-name inc-name include-dirs)
446 "Check if SOURCE-FILE-NAME can be found in include path. 446 "Check if SOURCE-FILE-NAME can be found in include path.
447Return t if it can be found via include path using INC-NAME." 447Return non-nil if it can be found via include path using INC-NAME."
448 (if (file-name-absolute-p inc-name) 448 (if (file-name-absolute-p inc-name)
449 (flymake-proc--same-files source-file-name inc-name) 449 (flymake-proc--same-files source-file-name inc-name)
450 (while (and include-dirs 450 (while (and include-dirs
@@ -458,7 +458,7 @@ Return t if it can be found via include path using INC-NAME."
458 458
459(defun flymake-proc--find-buffer-for-file (file-name) 459(defun flymake-proc--find-buffer-for-file (file-name)
460 "Check if there exists a buffer visiting FILE-NAME. 460 "Check if there exists a buffer visiting FILE-NAME.
461Return t if so, nil if not." 461Return the buffer if it exists, nil if not."
462 (let ((buffer-name (get-file-buffer file-name))) 462 (let ((buffer-name (get-file-buffer file-name)))
463 (if buffer-name 463 (if buffer-name
464 (get-buffer buffer-name)))) 464 (get-buffer buffer-name))))
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 8d457a28ec2..599923dd279 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -2703,7 +2703,7 @@ Whitespace and comments around the arrow are ignored.")
2703 2703
2704(defun js--broken-arrow-terminates-line-p () 2704(defun js--broken-arrow-terminates-line-p ()
2705 "Helper function for `js--proper-indentation'. 2705 "Helper function for `js--proper-indentation'.
2706Return t if the last non-comment, non-whitespace token of the 2706Return non-nil if the last non-comment, non-whitespace token of the
2707current line is the \"=>\" token (of an arrow function)." 2707current line is the \"=>\" token (of an arrow function)."
2708 (let ((from (point))) 2708 (let ((from (point)))
2709 (end-of-line) 2709 (end-of-line)