       s
     (encode-coding-string s 'utf-8 t)))
 
-(defun ycmd--standard-content (&optional buffer pos)
+(defun ycmd--standard-content (buffer pos)
   "Generate the 'standard' content for ycmd posts.
 
-This extracts a bunch of information from BUFFER.  If BUFFER is
-nil, this uses the current buffer."
-  (with-current-buffer (or buffer (current-buffer))
+This extracts a bunch of information from BUFFER at POS.  If
+BUFFER is nil, this uses the current buffer."
+  (with-current-buffer buffer
     (let* ((column-num (+ 1 (ycmd--column-in-bytes)))
-           (line-num (line-number-at-pos (or pos (point))))
+           (line-num (line-number-at-pos pos))
            (full-path (ycmd--encode-string (or (buffer-file-name) "")))
            (file-contents (ycmd--encode-string
                            (buffer-substring-no-properties

functions in `ycmd-file-parse-result-hook'."
  (when (and ycmd-mode (not (ycmd-parsing-in-progress-p)))
    (let* ((buff (current-buffer))
           (extra-content (append (when ycmd-tag-files
                                    (list 'tags))
                                  (when ycmd-seed-identifiers-with-keywords
                                    (list 'syntax-keywords))))
           (content (cons '("event_name" . "FileReadyToParse")
                          (ycmd--standard-content-with-extras
                           buff extra-content))))
      (deferred:$
        ;; try
        (deferred:$

  "Show debug information."
  (interactive)
  (when ycmd-mode
    (let ((buffer (current-buffer))
          (pos (point)))

      (deferred:$
        (let ((content (ycmd--standard-content buffer pos)))
          (ycmd--request
           "/debug_info"
           content
