aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorAlan Mackenzie2022-01-22 11:02:50 +0000
committerAlan Mackenzie2022-01-22 11:02:50 +0000
commit14d64a8adcc866deecd758b898e8ef2d836b354a (patch)
tree83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/progmodes
parentbdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff)
parentebe334cdc234de2897263aed4c05ac7088c11857 (diff)
downloademacs-scratch/correct-warning-pos.tar.gz
emacs-scratch/correct-warning-pos.zip
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gud.el3
-rw-r--r--lisp/progmodes/ruby-mode.el22
-rw-r--r--lisp/progmodes/xref.el12
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."
869COMMAND is the prefix for which we seek completion. 869COMMAND is the prefix for which we seek completion.
870CONTEXT is the text before COMMAND on the line." 870CONTEXT is the text before COMMAND on the line."
871 (let* ((complete-list 871 (let* ((complete-list
872 (gud-gdb-run-command-fetch-lines (concat "complete " context command) 872 (gud-gdb-run-command-fetch-lines (concat "server complete "
873 context command)
873 (current-buffer) 874 (current-buffer)
874 ;; From string-match above. 875 ;; From string-match above.
875 (length context)))) 876 (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'."
325 "Use `ruby-encoding-map' to set encoding magic comment if this is non-nil." 325 "Use `ruby-encoding-map' to set encoding magic comment if this is non-nil."
326 :type 'boolean :group 'ruby) 326 :type 'boolean :group 'ruby)
327 327
328(defcustom ruby-toggle-block-space-before-parameters t
329 "When non-nil, ensure space between the \"toggled\" curly and parameters.
330This only affects the output of the command `ruby-toggle-block'."
331 :type 'boolean
332 :safe 'booleanp
333 :version "29.1")
334
328;;; SMIE support 335;;; SMIE support
329 336
330(require 'smie) 337(require 'smie)
@@ -1722,13 +1729,14 @@ See `add-log-current-defun-function'."
1722 (insert "}") 1729 (insert "}")
1723 (goto-char orig) 1730 (goto-char orig)
1724 (delete-char 2) 1731 (delete-char 2)
1725 ;; Maybe this should be customizable, let's see if anyone asks. 1732 (insert "{")
1726 (insert "{ ") 1733 (if (looking-at "\\s +|")
1727 (setq beg-marker (point-marker)) 1734 (progn
1728 (when (looking-at "\\s +|") 1735 (just-one-space (if ruby-toggle-block-space-before-parameters 1 0))
1729 (delete-char (- (match-end 0) (match-beginning 0) 1)) 1736 (setq beg-marker (point-marker))
1730 (forward-char) 1737 (forward-char)
1731 (re-search-forward "|" (line-end-position) t)) 1738 (re-search-forward "|" (line-end-position) t))
1739 (setq beg-marker (point-marker)))
1732 (save-excursion 1740 (save-excursion
1733 (skip-chars-forward " \t\n\r") 1741 (skip-chars-forward " \t\n\r")
1734 (setq beg-pos (point)) 1742 (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.")
118(defcustom xref-file-name-display 'project-relative 118(defcustom xref-file-name-display 'project-relative
119 "Style of file name display in *xref* buffers. 119 "Style of file name display in *xref* buffers.
120 120
121If the value is the symbol `abs', the default, show the file names 121If the value is the symbol `abs', show the file names in their
122in their full absolute form. 122full absolute form.
123 123
124If `nondirectory', show only the nondirectory (a.k.a. \"base name\") 124If `nondirectory', show only the nondirectory (a.k.a. \"base name\")
125part of the file name. 125part of the file name.
126 126
127If `project-relative', show only the file name relative to the 127If `project-relative', the default, show only the file name
128current project root. If there is no current project, or if the 128relative to the current project root. If there is no current
129file resides outside of its root, show that particular file name 129project, or if the file resides outside of its root, show that
130in its full absolute form." 130particular file name in its full absolute form."
131 :type '(choice (const :tag "absolute file name" abs) 131 :type '(choice (const :tag "absolute file name" abs)
132 (const :tag "nondirectory file name" nondirectory) 132 (const :tag "nondirectory file name" nondirectory)
133 (const :tag "relative to project root" project-relative)) 133 (const :tag "relative to project root" project-relative))