diff options
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/gud.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 22 | ||||
-rw-r--r-- | lisp/progmodes/xref.el | 12 |
3 files changed, 23 insertions, 14 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 3f78c9eb15b..b42279415bc 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -869,7 +869,8 @@ the buffer in which this command was invoked." COMMAND is the prefix for which we seek completion. CONTEXT is the text before COMMAND on the line." (let* ((complete-list - (gud-gdb-run-command-fetch-lines (concat "complete " context command) + (gud-gdb-run-command-fetch-lines (concat "server complete " + context command) (current-buffer) ;; From string-match above. (length context)))) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 72631a6557f..eb54ffe05a8 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -325,6 +325,13 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." "Use `ruby-encoding-map' to set encoding magic comment if this is non-nil." :type 'boolean :group 'ruby) +(defcustom ruby-toggle-block-space-before-parameters t + "When non-nil, ensure space between the \"toggled\" curly and parameters. +This only affects the output of the command `ruby-toggle-block'." + :type 'boolean + :safe 'booleanp + :version "29.1") + ;;; SMIE support (require 'smie) @@ -1722,13 +1729,14 @@ See `add-log-current-defun-function'." (insert "}") (goto-char orig) (delete-char 2) - ;; Maybe this should be customizable, let's see if anyone asks. - (insert "{ ") - (setq beg-marker (point-marker)) - (when (looking-at "\\s +|") - (delete-char (- (match-end 0) (match-beginning 0) 1)) - (forward-char) - (re-search-forward "|" (line-end-position) t)) + (insert "{") + (if (looking-at "\\s +|") + (progn + (just-one-space (if ruby-toggle-block-space-before-parameters 1 0)) + (setq beg-marker (point-marker)) + (forward-char) + (re-search-forward "|" (line-end-position) t)) + (setq beg-marker (point-marker))) (save-excursion (skip-chars-forward " \t\n\r") (setq beg-pos (point)) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 066c051cfc3..37e2159782f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -118,16 +118,16 @@ When it is a file name, it should be the \"expanded\" version.") (defcustom xref-file-name-display 'project-relative "Style of file name display in *xref* buffers. -If the value is the symbol `abs', the default, show the file names -in their full absolute form. +If the value is the symbol `abs', show the file names in their +full absolute form. If `nondirectory', show only the nondirectory (a.k.a. \"base name\") part of the file name. -If `project-relative', show only the file name relative to the -current project root. If there is no current project, or if the -file resides outside of its root, show that particular file name -in its full absolute form." +If `project-relative', the default, show only the file name +relative to the current project root. If there is no current +project, or if the file resides outside of its root, show that +particular file name in its full absolute form." :type '(choice (const :tag "absolute file name" abs) (const :tag "nondirectory file name" nondirectory) (const :tag "relative to project root" project-relative)) |