Klimi's new dotfiles with stow.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

65 行
2.2 KiB

  1. ;;; haskell-compat.el --- legacy/compatibility backports for haskell-mode -*- lexical-binding: t -*-
  2. ;;
  3. ;; Filename: haskell-compat.el
  4. ;; Description: legacy/compatibility backports for haskell-mode
  5. ;; This file is not part of GNU Emacs.
  6. ;; This file is free software; you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation; either version 3, or (at your option)
  9. ;; any later version.
  10. ;; This file is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;;; Code:
  18. (require 'etags)
  19. (require 'ring)
  20. (require 'outline)
  21. (require 'xref nil t)
  22. (eval-when-compile
  23. (setq byte-compile-warnings '(not cl-functions obsolete)))
  24. ;; Cross-referencing commands have been replaced since Emacs 25.1.
  25. ;; These aliases are required to provide backward compatibility.
  26. (unless (fboundp 'xref-push-marker-stack)
  27. (defalias 'xref-pop-marker-stack 'pop-tag-mark)
  28. (defun xref-push-marker-stack (&optional m)
  29. "Add point M (defaults to `point-marker') to the marker stack."
  30. (ring-insert find-tag-marker-ring (or m (point-marker)))))
  31. (unless (fboundp 'outline-hide-sublevels)
  32. (defalias 'outline-hide-sublevels 'hide-sublevels))
  33. (unless (fboundp 'outline-show-subtree)
  34. (defalias 'outline-show-subtree 'show-subtree))
  35. (unless (fboundp 'outline-hide-sublevels)
  36. (defalias 'outline-hide-sublevels 'hide-sublevels))
  37. (unless (fboundp 'outline-show-subtree)
  38. (defalias 'outline-show-subtree 'show-subtree))
  39. (unless (fboundp 'xref-find-definitions)
  40. (defun xref-find-definitions (ident)
  41. (let ((next-p (and (boundp 'xref-prompt-for-identifier)
  42. xref-prompt-for-identifier)))
  43. (find-tag ident next-p))))
  44. (unless (fboundp 'font-lock-ensure)
  45. (defalias 'font-lock-ensure 'font-lock-fontify-buffer))
  46. (provide 'haskell-compat)
  47. ;;; haskell-compat.el ends here