diff options
| author | Glenn Morris | 2020-01-16 07:50:22 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-01-16 07:50:22 -0800 |
| commit | 215d9fcb79b6ec3c241f58fdff02bf15fb952d0c (patch) | |
| tree | 00b960d85395a10dd1831fef0fe73cb515dbbf11 /lisp | |
| parent | 0f4fa004ebbcf8796abab26988e79b01ba4f2ab5 (diff) | |
| parent | 52080b5778cbe535c331fa14539aecd88f2be0a0 (diff) | |
| download | emacs-215d9fcb79b6ec3c241f58fdff02bf15fb952d0c.tar.gz emacs-215d9fcb79b6ec3c241f58fdff02bf15fb952d0c.zip | |
Merge from origin/emacs-27
52080b5778 (origin/emacs-27) * lisp/minibuffer.el (read-file-name-def...
e4cec1fd10 ; * etc/NEWS: Fix some file name quotations.
13995f31a2 Make emacs prefer an existing ~/.emacs.d to an existing XD...
91cac24952 ; etc/NEWS minor edits
5505babc07 Describe --with-cairo non-support for bitmapped fonts.
caf00066ee Mention GTK font chooser changes in NEWS
23b87db628 ; Unmaintain fortran elisp
3b0d1a50aa f90: handle F2008 module function
55803cc189 Move shell-related menu items to "Shell Commands" submenu ...
2be48605c0 * admin/notes/font-backend: Remove outdated file. (Bug#34663)
f07a470124 Declare the ftx font backend driver obsolete
6c08a430fb ; Fix wording of a comment.
# Conflicts:
# admin/notes/font-backend
# etc/NEWS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/menu-bar.el | 33 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/f90.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/fortran.el | 2 | ||||
| -rw-r--r-- | lisp/startup.el | 42 |
5 files changed, 68 insertions, 37 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 90f9ef78c59..8f825a19adc 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1649,6 +1649,27 @@ mail status in mode line")) | |||
| 1649 | 1649 | ||
| 1650 | menu)) | 1650 | menu)) |
| 1651 | 1651 | ||
| 1652 | (defvar menu-bar-shell-commands-menu | ||
| 1653 | (let ((menu (make-sparse-keymap "Shell Commands"))) | ||
| 1654 | (bindings--define-key menu [interactive-shell] | ||
| 1655 | '(menu-item "Run Shell Interactively" shell | ||
| 1656 | :help "Run a subshell interactively")) | ||
| 1657 | |||
| 1658 | (bindings--define-key menu [async-shell-command] | ||
| 1659 | '(menu-item "Async Shell Command..." async-shell-command | ||
| 1660 | :help "Invoke a shell command asynchronously in background")) | ||
| 1661 | |||
| 1662 | (bindings--define-key menu [shell-on-region] | ||
| 1663 | '(menu-item "Shell Command on Region..." shell-command-on-region | ||
| 1664 | :enable mark-active | ||
| 1665 | :help "Pass marked region to a shell command")) | ||
| 1666 | |||
| 1667 | (bindings--define-key menu [shell] | ||
| 1668 | '(menu-item "Shell Command..." shell-command | ||
| 1669 | :help "Invoke a shell command and catch its output")) | ||
| 1670 | |||
| 1671 | menu)) | ||
| 1672 | |||
| 1652 | (defun menu-bar-read-mail () | 1673 | (defun menu-bar-read-mail () |
| 1653 | "Read mail using `read-mail-command'." | 1674 | "Read mail using `read-mail-command'." |
| 1654 | (interactive) | 1675 | (interactive) |
| @@ -1740,16 +1761,14 @@ mail status in mode line")) | |||
| 1740 | (bindings--define-key menu [gdb] | 1761 | (bindings--define-key menu [gdb] |
| 1741 | '(menu-item "Debugger (GDB)..." gdb | 1762 | '(menu-item "Debugger (GDB)..." gdb |
| 1742 | :help "Debug a program from within Emacs with GDB")) | 1763 | :help "Debug a program from within Emacs with GDB")) |
| 1743 | (bindings--define-key menu [shell-on-region] | ||
| 1744 | '(menu-item "Shell Command on Region..." shell-command-on-region | ||
| 1745 | :enable mark-active | ||
| 1746 | :help "Pass marked region to a shell command")) | ||
| 1747 | (bindings--define-key menu [shell] | ||
| 1748 | '(menu-item "Shell Command..." shell-command | ||
| 1749 | :help "Invoke a shell command and catch its output")) | ||
| 1750 | (bindings--define-key menu [compile] | 1764 | (bindings--define-key menu [compile] |
| 1751 | '(menu-item "Compile..." compile | 1765 | '(menu-item "Compile..." compile |
| 1752 | :help "Invoke compiler or Make, view compilation errors")) | 1766 | :help "Invoke compiler or Make, view compilation errors")) |
| 1767 | |||
| 1768 | (bindings--define-key menu [shell-commands] | ||
| 1769 | `(menu-item "Shell Commands" | ||
| 1770 | ,menu-bar-shell-commands-menu)) | ||
| 1771 | |||
| 1753 | (bindings--define-key menu [rgrep] | 1772 | (bindings--define-key menu [rgrep] |
| 1754 | '(menu-item "Recursive Grep..." rgrep | 1773 | '(menu-item "Recursive Grep..." rgrep |
| 1755 | :help "Interactively ask for parameters and search recursively")) | 1774 | :help "Interactively ask for parameters and search recursively")) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a8b2a984c52..4831bf72e9d 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -2737,8 +2737,13 @@ See `read-file-name' for the meaning of the arguments." | |||
| 2737 | (unless dir (setq dir (or default-directory "~/"))) | 2737 | (unless dir (setq dir (or default-directory "~/"))) |
| 2738 | (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) | 2738 | (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) |
| 2739 | (unless default-filename | 2739 | (unless default-filename |
| 2740 | (setq default-filename (if initial (expand-file-name initial dir) | 2740 | (setq default-filename |
| 2741 | buffer-file-name))) | 2741 | (cond |
| 2742 | ((null initial) buffer-file-name) | ||
| 2743 | ;; Special-case "" because (expand-file-name "" "/tmp/") returns | ||
| 2744 | ;; "/tmp" rather than "/tmp/" (bug#39057). | ||
| 2745 | ((equal "" initial) dir) | ||
| 2746 | (t (expand-file-name initial dir))))) | ||
| 2742 | ;; If dir starts with user's homedir, change that to ~. | 2747 | ;; If dir starts with user's homedir, change that to ~. |
| 2743 | (setq dir (abbreviate-file-name dir)) | 2748 | (setq dir (abbreviate-file-name dir)) |
| 2744 | ;; Likewise for default-filename. | 2749 | ;; Likewise for default-filename. |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 92fba1c53bb..22f1cfd7c89 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1995-1997, 2000-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995-1997, 2000-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se> | 5 | ;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se> |
| 6 | ;; Maintainer: Glenn Morris <rgm@gnu.org> | 6 | ;; Maintainer: emacs-devel@gnu.org |
| 7 | ;; Keywords: fortran, f90, languages | 7 | ;; Keywords: fortran, f90, languages |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -539,8 +539,10 @@ type-name parts, respectively." | |||
| 539 | read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) | 539 | read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) |
| 540 | ;; Other functions and declarations. Named interfaces = F2003. | 540 | ;; Other functions and declarations. Named interfaces = F2003. |
| 541 | ;; F2008: end submodule submodule_name. | 541 | ;; F2008: end submodule submodule_name. |
| 542 | '("\\_<\\(\\(?:end[ \t]*\\)?\\(program\\|\\(?:sub\\)?module\\|\ | 542 | ;; F2008: module function|subroutine NAME. |
| 543 | function\\|associate\\|subroutine\\|interface\\)\\|use\\|call\\)\ | 543 | '("\\_<\\(\\(?:end[ \t]*\\)?\\(program\\|\ |
| 544 | \\(?:module[ \t]*\\)?\\(?:function\\|subroutine\\)\\|\ | ||
| 545 | \\(?:sub\\)?module\\|associate\\|interface\\)\\|use\\|call\\)\ | ||
| 544 | \\_>[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?" | 546 | \\_>[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?" |
| 545 | (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) | 547 | (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) |
| 546 | ;; F2008: submodule (parent_name) submodule_name. | 548 | ;; F2008: submodule (parent_name) submodule_name. |
| @@ -1381,14 +1383,19 @@ write\\)[ \t]*([^)\n]*)") | |||
| 1381 | (cond | 1383 | (cond |
| 1382 | ((looking-at "\\(program\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>") | 1384 | ((looking-at "\\(program\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>") |
| 1383 | (list (match-string 1) (match-string 2))) | 1385 | (list (match-string 1) (match-string 2))) |
| 1384 | ((and (not (looking-at "module[ \t]*procedure\\_>")) | 1386 | ((and (not (looking-at "module[ \t]*\\(procedure\\|function\\|subroutine\\)\\_>")) |
| 1385 | (looking-at "\\(module\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>")) | 1387 | (looking-at "\\(module\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>")) |
| 1386 | (list (match-string 1) (match-string 2))) | 1388 | (list (match-string 1) (match-string 2))) |
| 1387 | ((looking-at "\\(submodule\\)[ \t]*([^)\n]+)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>") | 1389 | ((looking-at "\\(submodule\\)[ \t]*([^)\n]+)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>") |
| 1388 | (list (match-string 1) (match-string 2))) | 1390 | (list (match-string 1) (match-string 2))) |
| 1389 | ((and (not (looking-at "end[ \t]*\\(function\\|subroutine\\)")) | 1391 | ((and (not (looking-at "end[ \t]*\\(function\\|procedure\\|subroutine\\)")) |
| 1390 | (looking-at "[^!'\"&\n]*\\(function\\|subroutine\\)[ \t]+\ | 1392 | (looking-at "[^!'\"&\n]*\\(?:module[ \t]*\\)?\ |
| 1393 | \\(function\\|subroutine\\)[ \t]+\ | ||
| 1391 | \\(\\(?:\\sw\\|\\s_\\)+\\)")) | 1394 | \\(\\(?:\\sw\\|\\s_\\)+\\)")) |
| 1395 | ;; TODO: In F2008 "module procedure foo" may or may not start a block, | ||
| 1396 | ;; It is impossible to tell the difference without parsing state. | ||
| 1397 | ;;; (looking-at "[^!'\"&\n]*module[ \t]*\\(procedure\\)[ \t]+\ | ||
| 1398 | ;;;\\(\\(?:\\sw\\|\\s_\\)+\\)"))) | ||
| 1392 | (list (match-string 1) (match-string 2))))) | 1399 | (list (match-string 1) (match-string 2))))) |
| 1393 | ;; Following will match an un-named main program block; however | 1400 | ;; Following will match an un-named main program block; however |
| 1394 | ;; one needs to check if there is an actual PROGRAM statement after | 1401 | ;; one needs to check if there is an actual PROGRAM statement after |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index b7e9e7857bc..811951eaaaf 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> | 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> |
| 7 | ;; Maintainer: Glenn Morris <rgm@gnu.org> | 7 | ;; Maintainer: emacs-devel@gnu.org |
| 8 | ;; Keywords: fortran, languages | 8 | ;; Keywords: fortran, languages |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/startup.el b/lisp/startup.el index 2a85c004da1..1f545c66922 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -497,28 +497,28 @@ DIRS are relative." | |||
| 497 | (defvar startup--xdg-config-home-emacs) | 497 | (defvar startup--xdg-config-home-emacs) |
| 498 | 498 | ||
| 499 | ;; Return the name of the init file directory for Emacs, assuming | 499 | ;; Return the name of the init file directory for Emacs, assuming |
| 500 | ;; XDG-DIR is the XDG location and USER-NAME is the user name. | 500 | ;; XDG-DIR is the XDG location and USER-NAME is the user name. If |
| 501 | ;; If USER-NAME is nil or "", use the current user. | 501 | ;; USER-NAME is nil or "", use the current user. Prefer the XDG |
| 502 | ;; Prefer the XDG location unless it does does not exist and the | 502 | ;; location only if the .emacs.d location does not exist. |
| 503 | ;; .emacs.d location does exist. | ||
| 504 | (defun startup--xdg-or-homedot (xdg-dir user-name) | 503 | (defun startup--xdg-or-homedot (xdg-dir user-name) |
| 505 | (if (file-exists-p xdg-dir) | 504 | (let ((emacs-d-dir (concat "~" user-name |
| 506 | xdg-dir | 505 | (if (eq system-type 'ms-dos) |
| 507 | (let ((emacs-d-dir (concat "~" user-name | 506 | "/_emacs.d/" |
| 508 | (if (eq system-type 'ms-dos) | 507 | "/.emacs.d/")))) |
| 509 | "/_emacs.d/" | 508 | (cond |
| 510 | "/.emacs.d/")))) | 509 | ((or (file-exists-p emacs-d-dir) |
| 511 | (if (or (file-exists-p emacs-d-dir) | 510 | (if (eq system-type 'windows-nt) |
| 512 | (if (eq system-type 'windows-nt) | 511 | (if (file-directory-p (concat "~" user-name)) |
| 513 | (if (file-directory-p (concat "~" user-name)) | 512 | (directory-files (concat "~" user-name) nil |
| 514 | (directory-files (concat "~" user-name) nil | 513 | "\\`[._]emacs\\(\\.elc?\\)?\\'")) |
| 515 | "\\`[._]emacs\\(\\.elc?\\)?\\'")) | 514 | (file-exists-p (concat "~" init-file-user |
| 516 | (file-exists-p (concat "~" init-file-user | 515 | (if (eq system-type 'ms-dos) |
| 517 | (if (eq system-type 'ms-dos) | 516 | "/_emacs" |
| 518 | "/_emacs" | 517 | "/.emacs"))))) |
| 519 | "/.emacs"))))) | 518 | emacs-d-dir) |
| 520 | emacs-d-dir | 519 | ((file-exists-p xdg-dir) |
| 521 | xdg-dir)))) | 520 | xdg-dir) |
| 521 | (t emacs-d-dir)))) | ||
| 522 | 522 | ||
| 523 | (defun normal-top-level () | 523 | (defun normal-top-level () |
| 524 | "Emacs calls this function when it first starts up. | 524 | "Emacs calls this function when it first starts up. |