;;; ada-fix-error.el --- utilities for automatically fixing
;; errors reported by the compiler.
-;; Copyright (C) 1999-2009, 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2009, 2012-2014 Free Software Foundation, Inc.
;; Author : Stephen Leake <Stephen_Leake@stephe-leake.org>
;; Maintainer : Stephen Leake <Stephen_Leake@stephe-leake.org>
;;;; code
(require 'ada-mode)
+(require 'cl-lib)
(require 'compile)
-(eval-when-compile (require 'cl-macs))
-
(defcustom ada-fix-sort-context-clause t
"*If non-nil, sort context clause when inserting 'with'"
:type 'boolean
"Get compilation message at point.
Compatible with Emacs 23.4 and 24.x."
(cl-case emacs-major-version
- (23 (get-text-property (point) 'message))
- (24 (get-text-property (point) 'compilation-message))))
+ (23 (get-text-property (line-beginning-position) 'message))
+ (24 (get-text-property (line-beginning-position) 'compilation-message))))
(defun ada-fix-compiler-error ()
"Attempt to fix the current compiler error. Leave point at fixed code."