diff options
Diffstat (limited to 'lisp/mh-e/mh-compat.el')
-rw-r--r-- | lisp/mh-e/mh-compat.el | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index ae2cbff408..16dfe05b09 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -122,16 +122,6 @@ introduced in Emacs 22." "XEmacs does not have `font-lock-add-keywords'. This function returns nil on that system.") -(defun-mh mh-window-full-height-p - window-full-height-p (&optional WINDOW) - "Return non-nil if WINDOW is not the result of a vertical split. -This function is defined in XEmacs as it lacks -`window-full-height-p'. The values of the functions -`window-height' and `frame-height' are compared instead. The -argument WINDOW is ignored." - (= (1+ (window-height)) - (frame-height))) - (defun-mh mh-image-load-path-for-library image-load-path-for-library (library image &optional path no-error) "Return a suitable search path for images used by LIBRARY. @@ -261,6 +251,18 @@ The argument STRING is ignored." (buffer-substring-no-properties (match-beginning num) (match-end num))) +(defun-mh mh-pop-to-buffer-same-window + pop-to-buffer-same-window (&optional buffer-or-name norecord label) + "Pop to buffer specified by BUFFER-OR-NAME in the selected window. +Another window will be used only if the buffer can't be shown in +the selected window, usually because it is dedicated to another +buffer. Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are +as for `pop-to-buffer'. This macro is used by Emacs versions that +lack the `pop-to-buffer-same-window' function, introduced in +Emacs 24. The function `switch-to-buffer' is used instead and +LABEL is ignored." + (switch-to-buffer buffer-or-name norecord)) + (defun-mh mh-replace-regexp-in-string replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) "Replace REGEXP with REP everywhere in STRING and return result. @@ -312,6 +314,16 @@ The arguments RETURN-TO and EXIT-ACTION are ignored." (if exit-action nil) (view-mode 1)) +(defun-mh mh-window-full-height-p + window-full-height-p (&optional WINDOW) + "Return non-nil if WINDOW is not the result of a vertical split. +This function is defined in XEmacs as it lacks +`window-full-height-p'. The values of the functions +`window-height' and `frame-height' are compared instead. The +argument WINDOW is ignored." + (= (1+ (window-height)) + (frame-height))) + (defmacro mh-write-file-functions () "Return `write-file-functions' if it exists. Otherwise return `local-write-file-hooks'. |