|
159 | 159 | (define-key map (kbd "C-c ,a") 'elixir-mode-string-to-quoted-on-region)
|
160 | 160 | (define-key map (kbd "C-c ,l") 'elixir-mode-string-to-quoted-on-current-line)
|
161 | 161 | map)
|
162 |
| - "Keymap used in elixir-mode.") |
| 162 | + "Keymap used in `elixir-mode'.") |
163 | 163 |
|
164 | 164 | (defgroup elixir nil
|
165 | 165 | "Elixir major mode."
|
166 | 166 | :group 'languages)
|
167 | 167 |
|
168 | 168 | (defcustom elixir-compiler-command "elixirc"
|
169 |
| - "Elixir mode command to compile code. Must be in your path." |
| 169 | + "Elixir mode command to compile code. Must be in your path." |
170 | 170 | :type 'string
|
171 | 171 | :group 'elixir)
|
172 | 172 |
|
173 | 173 | (defcustom elixir-mode-command "elixir"
|
174 |
| - "The command for elixir" |
| 174 | + "The command for elixir." |
175 | 175 | :type 'string
|
176 | 176 | :group 'elixir)
|
177 | 177 |
|
178 | 178 | (defcustom elixir-iex-command "iex"
|
179 |
| - "Elixir mode command for interactive REPL. Must be in your path." |
| 179 | + "Elixir mode command for interactive REPL. Must be in your path." |
180 | 180 | :type 'string
|
181 | 181 | :group 'elixir)
|
182 | 182 |
|
|
325 | 325 | "Elixir mode operators.")
|
326 | 326 |
|
327 | 327 | (defvar elixir-mode-sigils '("B" "C" "R" "b" "c" "r")
|
328 |
| - "%-prefixed sigils that are understood by elixir-mode") |
| 328 | + "%-prefixed sigils that are understood by `elixir-mode'.") |
329 | 329 |
|
330 | 330 | (defvar elixir-basic-offset 2)
|
331 | 331 | (defvar elixir-key-label-offset 0)
|
|
381 | 381 | "Highlighting for Elixir mode.")
|
382 | 382 |
|
383 | 383 | (defun elixir-mode-cygwin-path (expanded-file-name)
|
384 |
| - "Elixir mode get Cygwin absolute path name." |
| 384 | + "Elixir mode get Cygwin absolute path name. |
| 385 | +Argument EXPANDED-FILE-NAME ." |
385 | 386 | (replace-regexp-in-string "^[a-zA-Z]:" elixir-mode-cygwin-prefix expanded-file-name t))
|
386 | 387 |
|
387 | 388 | (defun elixir-mode-universal-path (file-name)
|
388 |
| - "Elixir mode multi-OS path handler." |
| 389 | + "Elixir mode multi-OS path handler. |
| 390 | +Argument FILE-NAME ." |
389 | 391 | (let ((full-file-name (expand-file-name file-name)))
|
390 | 392 | (if (and (equal system-type 'windows-nt)
|
391 | 393 | elixir-mode-cygwin-paths)
|
392 | 394 | (elixir-mode-cygwin-path full-file-name)
|
393 | 395 | full-file-name)))
|
394 | 396 |
|
395 | 397 | (defun elixir-mode-command-compile (file-name)
|
396 |
| - "Elixir mode command to compile a file." |
| 398 | + "Elixir mode command to compile a file. |
| 399 | +Argument FILE-NAME ." |
397 | 400 | (let ((full-file-name (elixir-mode-universal-path file-name)))
|
398 | 401 | (mapconcat 'identity (append (list elixir-compiler-command) (list full-file-name)) " ")))
|
399 | 402 |
|
400 | 403 | (defun elixir-mode-compiled-file-name (&optional filename)
|
401 |
| - "Elixir mode compiled filename." |
| 404 | + "Elixir mode compiled FILENAME." |
402 | 405 | (concat (file-name-sans-extension (or filename (buffer-file-name))) ".beam"))
|
403 | 406 |
|
404 | 407 | (defun elixir-mode-compile-file ()
|
|
410 | 413 |
|
411 | 414 | ;;;###autoload
|
412 | 415 | (defun elixir-mode-iex (&optional args-p)
|
413 |
| - "Elixir mode interactive REPL." |
| 416 | + "Elixir mode interactive REPL. |
| 417 | +Optional argument ARGS-P ." |
414 | 418 | (interactive "P")
|
415 | 419 | (let ((switches (if (equal args-p nil)
|
416 | 420 | '()
|
|
484 | 488 | (message output)))
|
485 | 489 |
|
486 | 490 | (defun elixir-mode-eval-on-region (beg end)
|
487 |
| - "Evaluates the Elixir code on the marked region." |
| 491 | + "Evaluate the Elixir code on the marked region. |
| 492 | +Argument BEG Start of the region. |
| 493 | +Argument END End of the region." |
488 | 494 | (interactive (list (point) (mark)))
|
489 | 495 | (unless (and beg end)
|
490 | 496 | (error "The mark is not set now, so there is no region"))
|
491 | 497 | (let* ((region (buffer-substring-no-properties beg end)))
|
492 | 498 | (elixir-mode--eval-string region)))
|
493 | 499 |
|
494 | 500 | (defun elixir-mode-eval-on-current-line ()
|
495 |
| - "Evaluates the Elixir code on the current line." |
| 501 | + "Evaluate the Elixir code on the current line." |
496 | 502 | (interactive)
|
497 | 503 | (let ((current-line (thing-at-point 'line)))
|
498 | 504 | (elixir-mode--eval-string current-line)))
|
499 | 505 |
|
500 | 506 | (defun elixir-mode-eval-on-current-buffer ()
|
501 |
| - "Evaluates the Elixir code on the current buffer." |
| 507 | + "Evaluate the Elixir code on the current buffer." |
502 | 508 | (interactive)
|
503 | 509 | (let ((current-buffer (buffer-substring-no-properties (point-max) (point-min))))
|
504 | 510 | (elixir-mode--eval-string current-buffer)))
|
505 | 511 |
|
506 | 512 | (defun elixir-mode-string-to-quoted-on-region (beg end)
|
507 |
| - "Get the representation of the expression on the marked region." |
| 513 | + "Get the representation of the expression on the marked region. |
| 514 | +Argument BEG Start of the region. |
| 515 | +Argument END End of the region." |
508 | 516 | (interactive (list (point) (mark)))
|
509 | 517 | (unless (and beg end)
|
510 | 518 | (error "The mark is not set now, so there is no region"))
|
|
560 | 568 |
|
561 | 569 | ;;;###autoload
|
562 | 570 | (defun elixir-mode-run-tests ()
|
563 |
| - "Run ERT tests for `elixir-mode'." |
| 571 | + "Run ERT test for `elixir-mode'." |
564 | 572 | (interactive)
|
565 | 573 | (load "elixir-mode-tests")
|
566 | 574 | (ert-run-tests-interactively "^elixir-ert-.*$"))
|
|
0 commit comments