diff options
| -rw-r--r-- | lisp/pcmpl-gnu.el | 269 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 31 | ||||
| -rw-r--r-- | lisp/server.el | 26 |
3 files changed, 165 insertions, 161 deletions
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index 7d270ea789f..1553c3efed7 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el | |||
| @@ -184,6 +184,86 @@ Return the new list." | |||
| 184 | (when (and (not ,exist) (buffer-live-p ,buf)) | 184 | (when (and (not ,exist) (buffer-live-p ,buf)) |
| 185 | (kill-buffer ,buf)))))) | 185 | (kill-buffer ,buf)))))) |
| 186 | 186 | ||
| 187 | (defvar pcmpl-gnu--tar-long-options | ||
| 188 | ;; FIXME: Extract this list from "tar --help". | ||
| 189 | '("--absolute-names" | ||
| 190 | "--after-date=" | ||
| 191 | "--append" | ||
| 192 | "--atime-preserve" | ||
| 193 | "--backup" | ||
| 194 | "--block-number" | ||
| 195 | "--blocking-factor=" | ||
| 196 | "--catenate" | ||
| 197 | "--checkpoint" | ||
| 198 | "--compare" | ||
| 199 | "--compress" | ||
| 200 | "--concatenate" | ||
| 201 | "--confirmation" | ||
| 202 | "--create" | ||
| 203 | "--delete" | ||
| 204 | "--dereference" | ||
| 205 | "--diff" | ||
| 206 | "--directory=" | ||
| 207 | "--exclude=" | ||
| 208 | "--exclude-from=" | ||
| 209 | "--extract" | ||
| 210 | "--file=" | ||
| 211 | "--files-from=" | ||
| 212 | "--force-local" | ||
| 213 | "--get" | ||
| 214 | "--group=" | ||
| 215 | "--gzip" | ||
| 216 | "--help" | ||
| 217 | "--ignore-failed-read" | ||
| 218 | "--ignore-zeros" | ||
| 219 | "--incremental" | ||
| 220 | "--info-script=" | ||
| 221 | "--interactive" | ||
| 222 | "--keep-old-files" | ||
| 223 | "--label=" | ||
| 224 | "--list" | ||
| 225 | "--listed-incremental" | ||
| 226 | "--mode=" | ||
| 227 | "--modification-time" | ||
| 228 | "--multi-volume" | ||
| 229 | "--new-volume-script=" | ||
| 230 | "--newer=" | ||
| 231 | "--newer-mtime" | ||
| 232 | "--no-recursion" | ||
| 233 | "--null" | ||
| 234 | "--numeric-owner" | ||
| 235 | "--old-archive" | ||
| 236 | "--one-file-system" | ||
| 237 | "--owner=" | ||
| 238 | "--portability" | ||
| 239 | "--posix" | ||
| 240 | "--preserve" | ||
| 241 | "--preserve-order" | ||
| 242 | "--preserve-permissions" | ||
| 243 | "--read-full-records" | ||
| 244 | "--record-size=" | ||
| 245 | "--recursive-unlink" | ||
| 246 | "--remove-files" | ||
| 247 | "--rsh-command=" | ||
| 248 | "--same-order" | ||
| 249 | "--same-owner" | ||
| 250 | "--same-permissions" | ||
| 251 | "--sparse" | ||
| 252 | "--starting-file=" | ||
| 253 | "--suffix=" | ||
| 254 | "--tape-length=" | ||
| 255 | "--to-stdout" | ||
| 256 | "--totals" | ||
| 257 | "--uncompress" | ||
| 258 | "--ungzip" | ||
| 259 | "--unlink-first" | ||
| 260 | "--update" | ||
| 261 | "--use-compress-program=" | ||
| 262 | "--verbose" | ||
| 263 | "--verify" | ||
| 264 | "--version" | ||
| 265 | "--volno-file=")) | ||
| 266 | |||
| 187 | ;;;###autoload | 267 | ;;;###autoload |
| 188 | (defun pcomplete/tar () | 268 | (defun pcomplete/tar () |
| 189 | "Completion for the GNU tar utility." | 269 | "Completion for the GNU tar utility." |
| @@ -192,148 +272,53 @@ Return the new list." | |||
| 192 | (while (pcomplete-match "^-" 0) | 272 | (while (pcomplete-match "^-" 0) |
| 193 | (setq saw-option t) | 273 | (setq saw-option t) |
| 194 | (if (pcomplete-match "^--" 0) | 274 | (if (pcomplete-match "^--" 0) |
| 195 | (if (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0) | 275 | (cond |
| 196 | ;; FIXME: Extract this list from "tar --help". | 276 | ((pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0) |
| 197 | (pcomplete-here* | 277 | (pcomplete-here* pcmpl-gnu--tar-long-options)) |
| 198 | '("--absolute-names" | 278 | ((pcomplete-match "\\`--directory=\\(.*\\)" 0) |
| 199 | "--after-date=" | 279 | (pcomplete-here* (pcomplete-dirs) |
| 200 | "--append" | 280 | (pcomplete-match-string 1 0))) |
| 201 | "--atime-preserve" | 281 | ((pcomplete-match "\\`--exclude-from=\\(.*\\)" 0) |
| 202 | "--backup" | 282 | (pcomplete-here* (pcomplete-entries) |
| 203 | "--block-number" | 283 | (pcomplete-match-string 1 0))) |
| 204 | "--blocking-factor=" | 284 | ((pcomplete-match "\\`--\\(extract\\|list\\)\\'" 0) |
| 205 | "--catenate" | 285 | (setq complete-within t)) |
| 206 | "--checkpoint" | 286 | ((pcomplete-match "\\`--file=\\(.*\\)" 0) |
| 207 | "--compare" | 287 | (pcomplete-here* (pcomplete-dirs-or-entries |
| 208 | "--compress" | 288 | pcmpl-gnu-tarfile-regexp) |
| 209 | "--concatenate" | 289 | (pcomplete-match-string 1 0))) |
| 210 | "--confirmation" | 290 | ((pcomplete-match "\\`--files-from=\\(.*\\)" 0) |
| 211 | "--create" | 291 | (pcomplete-here* (pcomplete-entries) |
| 212 | "--delete" | 292 | (pcomplete-match-string 1 0))) |
| 213 | "--dereference" | 293 | ((pcomplete-match "\\`--group=\\(.*\\)" 0) |
| 214 | "--diff" | 294 | (pcomplete-here* (pcmpl-unix-group-names) |
| 215 | "--directory=" | 295 | (pcomplete-match-string 1 0))) |
| 216 | "--exclude=" | 296 | ((pcomplete-match "\\`--info-script=\\(.*\\)" 0) |
| 217 | "--exclude-from=" | 297 | (pcomplete-here* (pcomplete-entries) |
| 218 | "--extract" | 298 | (pcomplete-match-string 1 0))) |
| 219 | "--file=" | 299 | ((pcomplete-match "\\`--new-volume-script=\\(.*\\)" 0) |
| 220 | "--files-from=" | 300 | (pcomplete-here* (pcomplete-entries) |
| 221 | "--force-local" | 301 | (pcomplete-match-string 1 0))) |
| 222 | "--get" | 302 | ((pcomplete-match "\\`--owner=\\(.*\\)" 0) |
| 223 | "--group=" | 303 | (pcomplete-here* (pcmpl-unix-user-names) |
| 224 | "--gzip" | 304 | (pcomplete-match-string 1 0))) |
| 225 | "--help" | 305 | ((pcomplete-match "\\`--rsh-command=\\(.*\\)" 0) |
| 226 | "--ignore-failed-read" | 306 | (pcomplete-here* (funcall pcomplete-command-completion-function) |
| 227 | "--ignore-zeros" | 307 | (pcomplete-match-string 1 0))) |
| 228 | "--incremental" | 308 | ((pcomplete-match "\\`--starting-file=\\(.*\\)" 0) |
| 229 | "--info-script=" | 309 | (pcomplete-here* (pcomplete-entries) |
| 230 | "--interactive" | 310 | (pcomplete-match-string 1 0))) |
| 231 | "--keep-old-files" | 311 | ((pcomplete-match "\\`--use-compress-program=\\(.*\\)" 0) |
| 232 | "--label=" | 312 | (pcomplete-here* (funcall pcomplete-command-completion-function) |
| 233 | "--list" | 313 | (pcomplete-match-string 1 0))) |
| 234 | "--listed-incremental" | 314 | ((pcomplete-match "\\`--volno-file=\\(.*\\)" 0) |
| 235 | "--mode=" | 315 | (pcomplete-here* (pcomplete-entries) |
| 236 | "--modification-time" | 316 | (pcomplete-match-string 1 0))) |
| 237 | "--multi-volume" | 317 | (t |
| 238 | "--new-volume-script=" | 318 | (pcomplete-here*))) |
| 239 | "--newer=" | 319 | (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz") |
| 240 | "--newer-mtime" | 320 | (when (pcomplete-match "\\`-\\'" 0) |
| 241 | "--no-recursion" | 321 | (pcomplete-here*)))) |
| 242 | "--null" | ||
| 243 | "--numeric-owner" | ||
| 244 | "--old-archive" | ||
| 245 | "--one-file-system" | ||
| 246 | "--owner=" | ||
| 247 | "--portability" | ||
| 248 | "--posix" | ||
| 249 | "--preserve" | ||
| 250 | "--preserve-order" | ||
| 251 | "--preserve-permissions" | ||
| 252 | "--read-full-records" | ||
| 253 | "--record-size=" | ||
| 254 | "--recursive-unlink" | ||
| 255 | "--remove-files" | ||
| 256 | "--rsh-command=" | ||
| 257 | "--same-order" | ||
| 258 | "--same-owner" | ||
| 259 | "--same-permissions" | ||
| 260 | "--sparse" | ||
| 261 | "--starting-file=" | ||
| 262 | "--suffix=" | ||
| 263 | "--tape-length=" | ||
| 264 | "--to-stdout" | ||
| 265 | "--totals" | ||
| 266 | "--uncompress" | ||
| 267 | "--ungzip" | ||
| 268 | "--unlink-first" | ||
| 269 | "--update" | ||
| 270 | "--use-compress-program=" | ||
| 271 | "--verbose" | ||
| 272 | "--verify" | ||
| 273 | "--version" | ||
| 274 | "--volno-file="))) | ||
| 275 | (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz")) | ||
| 276 | (cond | ||
| 277 | ((pcomplete-match "\\`-\\'" 0) | ||
| 278 | (pcomplete-here*)) | ||
| 279 | ((pcomplete-match "\\`--after-date=" 0) | ||
| 280 | (pcomplete-here*)) | ||
| 281 | ((pcomplete-match "\\`--backup=" 0) | ||
| 282 | (pcomplete-here*)) | ||
| 283 | ((pcomplete-match "\\`--blocking-factor=" 0) | ||
| 284 | (pcomplete-here*)) | ||
| 285 | ((pcomplete-match "\\`--directory=\\(.*\\)" 0) | ||
| 286 | (pcomplete-here* (pcomplete-dirs) | ||
| 287 | (pcomplete-match-string 1 0))) | ||
| 288 | ((pcomplete-match "\\`--exclude-from=\\(.*\\)" 0) | ||
| 289 | (pcomplete-here* (pcomplete-entries) | ||
| 290 | (pcomplete-match-string 1 0))) | ||
| 291 | ((pcomplete-match "\\`--exclude=" 0) | ||
| 292 | (pcomplete-here*)) | ||
| 293 | ((pcomplete-match "\\`--\\(extract\\|list\\)\\'" 0) | ||
| 294 | (setq complete-within t)) | ||
| 295 | ((pcomplete-match "\\`--file=\\(.*\\)" 0) | ||
| 296 | (pcomplete-here* (pcomplete-dirs-or-entries pcmpl-gnu-tarfile-regexp) | ||
| 297 | (pcomplete-match-string 1 0))) | ||
| 298 | ((pcomplete-match "\\`--files-from=\\(.*\\)" 0) | ||
| 299 | (pcomplete-here* (pcomplete-entries) | ||
| 300 | (pcomplete-match-string 1 0))) | ||
| 301 | ((pcomplete-match "\\`--group=\\(.*\\)" 0) | ||
| 302 | (pcomplete-here* (pcmpl-unix-group-names) | ||
| 303 | (pcomplete-match-string 1 0))) | ||
| 304 | ((pcomplete-match "\\`--info-script=\\(.*\\)" 0) | ||
| 305 | (pcomplete-here* (pcomplete-entries) | ||
| 306 | (pcomplete-match-string 1 0))) | ||
| 307 | ((pcomplete-match "\\`--label=" 0) | ||
| 308 | (pcomplete-here*)) | ||
| 309 | ((pcomplete-match "\\`--mode=" 0) | ||
| 310 | (pcomplete-here*)) | ||
| 311 | ((pcomplete-match "\\`--new-volume-script=\\(.*\\)" 0) | ||
| 312 | (pcomplete-here* (pcomplete-entries) | ||
| 313 | (pcomplete-match-string 1 0))) | ||
| 314 | ((pcomplete-match "\\`--newer=" 0) | ||
| 315 | (pcomplete-here*)) | ||
| 316 | ((pcomplete-match "\\`--owner=\\(.*\\)" 0) | ||
| 317 | (pcomplete-here* (pcmpl-unix-user-names) | ||
| 318 | (pcomplete-match-string 1 0))) | ||
| 319 | ((pcomplete-match "\\`--record-size=" 0) | ||
| 320 | (pcomplete-here*)) | ||
| 321 | ((pcomplete-match "\\`--rsh-command=\\(.*\\)" 0) | ||
| 322 | (pcomplete-here* (funcall pcomplete-command-completion-function) | ||
| 323 | (pcomplete-match-string 1 0))) | ||
| 324 | ((pcomplete-match "\\`--starting-file=\\(.*\\)" 0) | ||
| 325 | (pcomplete-here* (pcomplete-entries) | ||
| 326 | (pcomplete-match-string 1 0))) | ||
| 327 | ((pcomplete-match "\\`--suffix=" 0) | ||
| 328 | (pcomplete-here*)) | ||
| 329 | ((pcomplete-match "\\`--tape-length=" 0) | ||
| 330 | (pcomplete-here*)) | ||
| 331 | ((pcomplete-match "\\`--use-compress-program=\\(.*\\)" 0) | ||
| 332 | (pcomplete-here* (funcall pcomplete-command-completion-function) | ||
| 333 | (pcomplete-match-string 1 0))) | ||
| 334 | ((pcomplete-match "\\`--volno-file=\\(.*\\)" 0) | ||
| 335 | (pcomplete-here* (pcomplete-entries) | ||
| 336 | (pcomplete-match-string 1 0))))) | ||
| 337 | (unless saw-option | 322 | (unless saw-option |
| 338 | (pcomplete-here | 323 | (pcomplete-here |
| 339 | (mapcar #'char-to-string | 324 | (mapcar #'char-to-string |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 92e018aaec1..cfe5f75d19f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -135,9 +135,9 @@ Used to gray out relevant toolbar icons.") | |||
| 135 | (defun gud-goto-info () | 135 | (defun gud-goto-info () |
| 136 | "Go to relevant Emacs info node." | 136 | "Go to relevant Emacs info node." |
| 137 | (interactive) | 137 | (interactive) |
| 138 | (if (eq gud-minor-mode 'gdbmi) | 138 | (info-other-window (if (eq gud-minor-mode 'gdbmi) |
| 139 | (info-other-window "(emacs)GDB Graphical Interface") | 139 | "(emacs)GDB Graphical Interface" |
| 140 | (info-other-window "(emacs)Debuggers"))) | 140 | "(emacs)Debuggers"))) |
| 141 | 141 | ||
| 142 | (defun gud-tool-bar-item-visible-no-fringe () | 142 | (defun gud-tool-bar-item-visible-no-fringe () |
| 143 | (not (or (eq (buffer-local-value 'major-mode (window-buffer)) 'speedbar-mode) | 143 | (not (or (eq (buffer-local-value 'major-mode (window-buffer)) 'speedbar-mode) |
| @@ -159,14 +159,17 @@ Used to gray out relevant toolbar icons.") | |||
| 159 | (t | 159 | (t |
| 160 | (comint-interrupt-subjob))))) | 160 | (comint-interrupt-subjob))))) |
| 161 | 161 | ||
| 162 | (defvar-keymap gud-shared-mode-map | ||
| 163 | :doc "Keymap shared between `gud-mode' and `gud-minor-mode'.") | ||
| 164 | |||
| 162 | (defvar-keymap gud-mode-map | 165 | (defvar-keymap gud-mode-map |
| 163 | ;; Will inherit from comint-mode via define-derived-mode. | 166 | :doc "`gud-mode' keymap." |
| 164 | :doc "`gud-mode' keymap.") | 167 | :parent (make-composed-keymap gud-shared-mode-map comint-mode-map)) |
| 165 | 168 | ||
| 166 | (defvar-keymap gud-minor-mode-map | 169 | (defvar-keymap gud-minor-mode-map |
| 167 | :parent gud-mode-map) | 170 | :parent gud-shared-mode-map) |
| 168 | 171 | ||
| 169 | (easy-menu-define gud-menu-map gud-mode-map | 172 | (easy-menu-define gud-menu-map gud-shared-mode-map |
| 170 | "Menu for `gud-mode'." | 173 | "Menu for `gud-mode'." |
| 171 | '("Gud" | 174 | '("Gud" |
| 172 | ["Continue" gud-cont | 175 | ["Continue" gud-cont |
| @@ -535,9 +538,9 @@ required by the caller." | |||
| 535 | (value (nth 4 var)) (status (nth 5 var)) | 538 | (value (nth 4 var)) (status (nth 5 var)) |
| 536 | (has-more (nth 6 var))) | 539 | (has-more (nth 6 var))) |
| 537 | (put-text-property | 540 | (put-text-property |
| 538 | 0 (length expr) 'face font-lock-variable-name-face expr) | 541 | 0 (length expr) 'face 'font-lock-variable-name-face expr) |
| 539 | (put-text-property | 542 | (put-text-property |
| 540 | 0 (length type) 'face font-lock-type-face type) | 543 | 0 (length type) 'face 'font-lock-type-face type) |
| 541 | (while (string-match "\\." varnum start) | 544 | (while (string-match "\\." varnum start) |
| 542 | (setq depth (1+ depth) | 545 | (setq depth (1+ depth) |
| 543 | start (1+ (match-beginning 0)))) | 546 | start (1+ (match-beginning 0)))) |
| @@ -1260,7 +1263,7 @@ whereby $stopformat=1 produces an output format compatible with | |||
| 1260 | (define-key map key cmd)) | 1263 | (define-key map key cmd)) |
| 1261 | (when (or gud-mips-p | 1264 | (when (or gud-mips-p |
| 1262 | gud-irix-p) | 1265 | gud-irix-p) |
| 1263 | (define-key map "f" 'gud-finish)) | 1266 | (define-key map "f" #'gud-finish)) |
| 1264 | map) | 1267 | map) |
| 1265 | "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'. | 1268 | "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'. |
| 1266 | Used in `repeat-mode'.") | 1269 | Used in `repeat-mode'.") |
| @@ -3422,9 +3425,9 @@ class of the file (using s to separate nested class ids)." | |||
| 3422 | 3425 | ||
| 3423 | (defun gdb-script-font-lock-syntactic-face (state) | 3426 | (defun gdb-script-font-lock-syntactic-face (state) |
| 3424 | (cond | 3427 | (cond |
| 3425 | ((nth 3 state) font-lock-string-face) | 3428 | ((nth 3 state) 'font-lock-string-face) |
| 3426 | ((nth 7 state) font-lock-doc-face) | 3429 | ((nth 7 state) 'font-lock-doc-face) |
| 3427 | (t font-lock-comment-face))) | 3430 | (t 'font-lock-comment-face))) |
| 3428 | 3431 | ||
| 3429 | (defvar gdb-script-basic-indent 2) | 3432 | (defvar gdb-script-basic-indent 2) |
| 3430 | 3433 | ||
| @@ -3455,7 +3458,7 @@ class of the file (using s to separate nested class ids)." | |||
| 3455 | (defun gdb-script-indent-line () | 3458 | (defun gdb-script-indent-line () |
| 3456 | "Indent current line of GDB script." | 3459 | "Indent current line of GDB script." |
| 3457 | (interactive) | 3460 | (interactive) |
| 3458 | (if (and (eq (get-text-property (point) 'face) font-lock-doc-face) | 3461 | (if (and (eq (get-text-property (point) 'face) 'font-lock-doc-face) |
| 3459 | (save-excursion | 3462 | (save-excursion |
| 3460 | (forward-line 0) | 3463 | (forward-line 0) |
| 3461 | (skip-chars-forward " \t") | 3464 | (skip-chars-forward " \t") |
diff --git a/lisp/server.el b/lisp/server.el index 35b38ef8fa6..89aedc72d52 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1929,12 +1929,22 @@ This sets the variable `server-stop-automatically' (which see)." | |||
| 1929 | ;; continue standard unloading | 1929 | ;; continue standard unloading |
| 1930 | nil) | 1930 | nil) |
| 1931 | 1931 | ||
| 1932 | (define-error 'server-return-invalid-read-syntax | ||
| 1933 | "Emacs server returned unreadable result of evaluation" | ||
| 1934 | 'invalid-read-syntax) | ||
| 1935 | |||
| 1932 | (defun server-eval-at (server form) | 1936 | (defun server-eval-at (server form) |
| 1933 | "Contact the Emacs server named SERVER and evaluate FORM there. | 1937 | "Contact the Emacs server named SERVER and evaluate FORM there. |
| 1934 | Returns the result of the evaluation, or signals an error if it | 1938 | Returns the result of the evaluation. For example: |
| 1935 | cannot contact the specified server. For example: | ||
| 1936 | (server-eval-at \"server\" \\='(emacs-pid)) | 1939 | (server-eval-at \"server\" \\='(emacs-pid)) |
| 1937 | returns the process ID of the Emacs instance running \"server\"." | 1940 | returns the process ID of the Emacs instance running \"server\". |
| 1941 | |||
| 1942 | This function signals `error' if it could not contact the server. | ||
| 1943 | |||
| 1944 | This function signals `server-return-invalid-read-syntax' if it | ||
| 1945 | couldn't read the result of evaluation printed by the server. | ||
| 1946 | This will occur whenever the result of evaluating FORM is something | ||
| 1947 | not readably printable." | ||
| 1938 | (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) | 1948 | (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) |
| 1939 | (server-file (expand-file-name server server-dir)) | 1949 | (server-file (expand-file-name server server-dir)) |
| 1940 | (coding-system-for-read 'binary) | 1950 | (coding-system-for-read 'binary) |
| @@ -1980,8 +1990,14 @@ returns the process ID of the Emacs instance running \"server\"." | |||
| 1980 | (progn (skip-chars-forward "^\n") | 1990 | (progn (skip-chars-forward "^\n") |
| 1981 | (point)))))) | 1991 | (point)))))) |
| 1982 | (if (not (equal answer "")) | 1992 | (if (not (equal answer "")) |
| 1983 | (read (decode-coding-string (server-unquote-arg answer) | 1993 | (condition-case err |
| 1984 | 'emacs-internal))))))) | 1994 | (read |
| 1995 | (decode-coding-string (server-unquote-arg answer) | ||
| 1996 | 'emacs-internal)) | ||
| 1997 | ;; Re-signal with a more specific condition. | ||
| 1998 | (invalid-read-syntax | ||
| 1999 | (signal 'server-return-invalid-read-syntax | ||
| 2000 | (cdr err))))))))) | ||
| 1985 | 2001 | ||
| 1986 | 2002 | ||
| 1987 | (provide 'server) | 2003 | (provide 'server) |